PUT Method inserting new data in associated table. Please help

Hi Guys, ( I am using CRUD plugin from #friendsofcake)

I have implemented CRUD in my project and everything is working fine. But the problem I am facing is related to PUT method

I have 2 tables in my database ‘animals’ and ‘animals_images’.

When I try to call PUT method to update existing ‘animals’. the ‘animals’ table data is getting updated but the api is inserting new data in ‘animals_images’ in place of updating in ‘animals_images’ table.

Is there anyone who can help me to fix this problem?

Thanks and Regards,

I have fixed the problem. I just copied the code from Baked Controller for my table class and updated the contain statement like this

$animal = $this->Animals->get($id, [

‘contain’ => [ ‘AnimalsImages’]


I hope this will help someone else too to fix the problem if he/she faced while calling put method to udpate the associated table.


Is there any one who can help me to solve the problem in friendsofcake for crud?

The put method in CRUD is not working as expected. ( I have solve the problem in different way, But Still looking for solution)