DMZ Issues - 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: DMZ Issues (/showthread.php?tid=27061) |
DMZ Issues - El Forum - 01-30-2010 [eluser]Unknown[/eluser] I seem to have trouble getting DMZ to work. Either I'm missing something obvious, or I'm just plain doing it wrong. I can't seem to get relationships to work. The tables don't join. What am I doing wrong here? Datamapper Config (config/datamapper.php) Code: $config['auto_populate_has_many'] = TRUE; Blog Controller (controllers/blog.php) Code: public function index() Articles Model (models/article.php) Code: class Article extends DataMapper Author Model (models/author.php) Code: class Author extends DataMapper Profiler Output Code: DATABASE: personal QUERIES: 2 DMZ Issues - El Forum - 01-31-2010 [eluser]David Cassidy[/eluser] [quote author="harbingerkun" date="1264938208"] Code: public function index() I believe the solution you are looking for is: Code: public function index() If you check the source of the page, you'll see that the array does indeed include your author information. DMZ Issues - El Forum - 03-26-2010 [eluser]santiagofs[/eluser] I'm having a problem with the include_related function. It works ok on my local server but its not getting the related objects on the online server. Only difference I can see is the php version. I'm running v.5.2.5 locally and v.5.2.13 online. Does anyone having a similar issue? Thanks. |