> in addition: in my view i retrieve this data in a foreach loop with
> this code:
> [view code]
> <td style="text-align:left"><?php if ($port['Port']['uplink_id'] !=
> NULL) { ?> <?php echo "-> port id "; echo $port['Port']['uplink_id'];
> echo " (-> number: "; echo $port['ParentPort']['HardwareUnit']
> ['schenker_number']; echo ")"; } ?></td>
Great. For the self join model, you could go back to what you had
earlier, 'PortUplink', as the alias:
var $hasOne = array(
'PortUplink' => array(
'className' => 'Port',
'foreignKey' => 'uplink_id'
)
);
Just don't forget to change the 'contain' option and the view code if
you do.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
No comments:
Post a Comment