Codeignier e datamapper one-to-many - 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: Codeignier e datamapper one-to-many (/showthread.php?tid=61114) |
Codeignier e datamapper one-to-many - El Forum - 09-21-2014 [eluser]Unknown[/eluser] personal well'm doing a very simple system and I am with the following problem, I have 3 tables users, categories and posts, cata has a pos and a User category in the database tables have 5 post, User, category, post_usuario, categoria_post, when I access the users access works perfectly but when the category of the following error Code: DataMapper Error: 'categorium' is not a valid parent relationship for Post. Are your relationships configured correctly? Code: class Categoria extends DataMapper{ I'm trying public function posts($id){ $cate = new Categoria($id); Code: $data['categoria'] = new Categoria(); but not work |