I already use a method which takes the ITFK (user_id) from the DMZ model "registration" and then via a library, I pull the userdata I need. I also use the Active Record method and do:
Code:
$object->query($sql);
I guess what I need is a work-around that will perform a join using both DMZ and AR methods from a DMZ object: (be mindful) I haven't tested this desperate request yet. :roll:
ie:
Events and Registrations both extend datamapper.
Registration has a "user_id" field which is a foreign key by theory to a table in another database.
What I would like is for every "event" obj. that has a related "registration" object, to get a result set which includes selected data from the "users" table as an object.
Quote:I think what I should do is:
---(A) get all $registrations related to the event(s)
and then
---(B) loop all()
-------- [1] convert each result as an array.
-------- [2] get the appropriate userdata based on the result->user-id, as an array
-------- [3] append both into a master array
This is just an explanation on what I'm looking for. No need to adjust your schedule quite yet, but thanks for re-directing my preliminary thoughts.
Oh, and the main reason for all this custom methods, is that the other database carries profile and other forum info that changes daily, weekly, etc.