Hi all
I have a data model like this:
*HospitalAdmission* belongsTo *Subject* hasMany *Contents*
That is, I have a subject_id column on HospitalAdmission, and a column with
the same name in Contents. Plus, HospitalAdmission is in one database, and
Subject and Contents in other, not being possible (for technical reasons)
to join them together in the same query.
I'd like to directly get all HospitalAdmissions linked to some Content, but
I only found documentation on how to specify the foreignKey of a hasMany
relation - in this case, I would have to specify hasMany not to look into
Content.id field.
I could do this programatically (by getting all subject_id from a
Content->find('all') and then HospitalAdmission->find('all')), or putting
the full relationship with Subject (which would be a little cumbersome, as
I don`t really need any information in this
any thoughts?
--
diogo patrĂ£o
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php