What you have is:

A message has an author and a recipient. Both the author and recipient
are users so

Message Table:

id, Primary Key
author_id, Foreign Key to Users table
recipient_id, Foreign Key to Users table

Check out the docs for $belongsTo, you can tell cake that the
author_id field points Users.id and recipient_id points to Users.id
(the same or a different user).


On Aug 21, 4:04 pm, deepc <[EMAIL PROTECTED]> wrote:
> A question to habtm.
> I have an object message and user
> A message could be a sent or an received message and belongs to an
> user.
> Is it possible to model such different roles between the same object
> in cake?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to