DataMapper ORM: Saving ids on relationship table - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: DataMapper ORM: Saving ids on relationship table (/showthread.php?tid=55228) |
DataMapper ORM: Saving ids on relationship table - El Forum - 10-16-2012 [eluser]pfreitas[/eluser] I've a employees, services and a employees_services table where I store the services one employee execute with their id and service id. I'm having trouble to save/update the services one employee execute... Code: // ... Thank you in advance! DataMapper ORM: Saving ids on relationship table - El Forum - 10-16-2012 [eluser]WanWizard[/eluser] You'll have to delete them. Datamapper doesn't know what relations are already present with this code, nor what you indent to do with them. This code only creates or updates the relation between the employee and the services listed in service->all, it doesn't delete anything. You'll have to do that yourself. |