Is there any way to get data through Foreign key via Datamapper? |
[eluser]Ricola[/eluser]
Hi there. I'm newbie with Datamapper ORM Library. Is it possible to get data automatically through foreign key via ORM? MY table:: Category -ID -Name Content -ID -Title -Description -CategoryID(FK) This is my expected result: Content (ID,Titlte,Description,CategoryName) In the normal way we have to join these two table and get data from it but i wanna know, What is the best practice when we wanna get data like this Thanks in advanced
[eluser]WanWizard[/eluser]
Code: $content = new Content(); See http://datamapper.wanwizard.eu/pages/get...de_related |
Welcome Guest, Not a member yet? Register Sign In |