@Qureshi
First off, Welcome to CI!
I would suggest that if you truly want to use DataMapper Library, that you check the USER GUIDE for it.
Then, read-up on the adaption to Datamapper (DMZ edition)
It will unlock the answers on how to take advantage of the Relationships you have from Category to Verses (etc.).
What I’m getting at is that it will depend on whether you want to build the tables to match DataMapper’s guidelines or need customization. 😉
Hi,
I have read the documentation but it doesn’t cover such complex relations, and I don’t even understand what DMZ documentation says, or what DMZ even does that DM can’t. It would be best if you could post your replies to me in the thread that I have created and linked to in my previous post, since I have notifications turned on and I don’t wish to receive notifications merely when this thread is updated.
Basically, I’m hoping that I can do something like this to get all my data:
$data = new Category();
$data->get_where(‘id’, $id)->verse->translation->translator;
But that doesn’t work. If it did, it would’ve given me (1) all the verses in a category,(2) the translations for each verse, (3) the translator name of each translation. An array like this:
Verse1
——-Translation1
————————Translator
——-Translation2
————————Translator
——-Translation3
————————Translator
——-Translation4
————————Translator
Verse2
——-Translation1
————————Translator
——-Translation2
————————Translator
——-Translation3
————————Translator
——-Translation4
————————Translator
Verse3
——-Translation1
————————Translator
——-Translation2
————————Translator
——-Translation3
————————Translator
——-Translation4
————————Translator
Thread: http://ellislab.com/forums/viewthread/112411
Thanks in advance,
Nadeem Qureshi