On Feb 12, 2008 11:46 AM, avairet <[EMAIL PROTECTED]> wrote:
>
> Hi everybody,
>
> I'm trying to create a "reflexive association", a table HABTM with
> itself.
> What is the better way to generate it with Cake?
>
Have you tried this?
var $name = 'YourModel';
var $hasAndBelongsToMany = array(
'YourModel' =>
array('className' => 'YourModel',
'joinTable' => 'your_models_your_models',
'foreignKey' => 'your_model_id',
'associationForeignKey' => 'your_model_id'
)
);
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---