Values not saving in datamaper ORM - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Values not saving in datamaper ORM (/showthread.php?tid=41931) |
Values not saving in datamaper ORM - El Forum - 05-21-2011 [eluser]mak.gnu[/eluser] hi, This is my first application in ORM and I'm using Datamapper DMZ for this. Please Excuse me if this is very basic Question but I'm litile confused my app is a classified for a trucks. Here is a mine database structure. Code: classifieds Code: function save(){ after running this function classified and user is being saved but not the joining tables. an help would be appreciated Values not saving in datamaper ORM - El Forum - 05-21-2011 [eluser]WanWizard[/eluser] Your models don't match your database design. And your database design isn't correct either. Take for example classifieds and users. If every classified has one user, and every user has many classified, you need a user_id in classified, and no relationship table (only needed in many-to-many relations): Code: classifieds The model definitions will then be Code: Classified extends Datamapper You should verify all other definitions similarly, as they aren't correct either. |