Thanks Smelly,
my requirment is that data must be insert in entitles_tabel if I will
change name of modal specified by with than I have to use new tabel.
like:
var $hasAndBelongsToMany = array(
'Tag' => array('className' => 'Tag',
'joinTable' => 'entities_tags',
'foreignKey' => 'entity_id',
'associationForeignKey' => 'tag_id',
'with' => 'EntitiesTag1',
'unique' => true,
'conditions' => 'EntitiesTag1.entity = 1',
),
);
If I will use modal name EntitiesTag1 than I have to use new tabel
name entities_tag1..that's not my requiremnet.
Can you write a little example using my tabel stracture that is define
above... sothat I can come out this problem also please write how
should I assign 'entity' valueinside $this->data
like: $this->data['EntitiesTag']['entity'] = 1 or something else ?
Please help me
Thanks a lot to u and everybody
On Dec 3, 8:19 pm, Smelly_Eddie <[EMAIL PROTECTED]> wrote:
> I believe the with attribute will conflict with 'join_table' because
> the model specified by 'wiht' already knows what table it wants to
> use.
>
> You should use one or the other.
>
> I have successfully added additional fields in aHABTMusing
> 'with' ..without issue
>
>
>
> > var $hasAndBelongsToMany = array(
> > 'Tag' => array('className' => 'Tag',
> > 'joinTable' => 'entities_tags',
> > 'foreignKey' => 'entity_id',
> > 'associationForeignKey' => 'tag_id',
> > 'with' => 'EntitiesTag',
> > 'unique' => true,
> > 'conditions' => 'EntitiesTag.entity= 1',
> > ),
> > );
>
> > }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---