Hi all,
I've got a messages model with two fields called sender and
recipient which I'd like to link to the users table.
I tried:
--
var $hasOne = array(
'User' = array(
'className' = 'User',
'foreignKey' = 'sender',
Try:
var $hasOne = array(
'Sender' = array(
'className' = 'User',
'foreignKey' = 'sender',
'conditions' = 'User.id = Message.sender',
'fields' = '',
'order' =
nah, doesn't work.. :/
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
Actually, looking at this a bit more, I'd like to pose a few questions.
The general way of relating one table to another twice is that you give each a
different class name - in your case Sender and Recipient. You then do a normal
join, specifying the class name (User in your case) of the
Jeremy,
thanks for the link, it was a bit buried in the depths of The Book, so
I didn't find it at first. Will check there now.. - Initial test
wasn't working, but I'll be getting there (I hope)! ;)
cheers!
nils
On 4 Jun., 15:28, Jeremy Burns jeremybu...@me.com wrote:
Actually, looking at