Hi Jérôme
> I'm just a new cake user, and I'm facing my first problem...
> For a simple app, I'd like to add Todo's for Projects. These todo's
> are created by a User and assigned to a User.
> I've tried to do my association like this for the Todo model, but it
> doesn't work, it seems that not possible to have two times the User
> className in belongsTo.
try:
class Todo extends AppModel {
var $name = 'Todo';
var $belongsTo = array(
'Project',
'Creator' => array (
'className'=>'User',
'foreignKey'=>'creator_id'
),
'Assignee' => array (
'className'=>'User',
'foreignKey'=>'assigned_to'
)
);
}
hth
jon
--
jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---