As far as I know you can have a model point to itself, however since
your foreign key isn't following the naming convention (if the table
is named comments, reply_id should be named comment_id), you'll need
to define the foreign key name in the belongsTo relationship
definition.

On Jul 8, 7:07 pm, . <[EMAIL PROTECTED]> wrote:
> I have a comments table with a unique id, and a reply_id (which will hold
> point to the unique id and serve as reply-to messages to the original
> comment). How would I model this? Can I have a $var belongs_to that points
> back to itself?
>
> thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to