Wednesday, November 16, 2011

Joining tables after belongsTo Associations

Hi everybody. I have the next question:

It is possible to create a join association table in
theModel::find('all',$options ) and this Join perform after the
belogsTo Assoc of the model.

Actually if you do some like:

$options['joins'] = array(
array('table' => 'channels',
'alias' => 'Channel',
'type' => 'LEFT',
'conditions' => array(
'Channel.id = Item.channel_id',
)
)
);
$Item->recursive = 1;
$Item->find('all', $options);

cakephp puts this joins before belonsgTo, but i need tu put that
joins after. I need recursive=1.

I hope some help me and thanks !!!!

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate