i'm using an extension by Brandon Praise; the extension's name is
ExtendAssosiationsBehavior which is easy to use to edit, delete or add entry
to HABTM related models.

http://bakery.cakephp.org/articles/view/add-delete-habtm-behavior

hope helps...

On Sun, Jun 27, 2010 at 5:49 PM, Rami <ramima...@gmail.com> wrote:

> Hi All,
>
> I am a cakephp beginner and I need your support regarding an issue
> with updating HABTM models.
>
> I noticed a weird behavior that cakephp is doing which is deleting all
> old rows and inserting new ones whenever and HABTM model is edited. I
> read in the cookbook that this how it is, and I read that there is a
> 'unique' attribute which is considered as a flag for this 'delete old
> - insert new' process.
>
> Is there anyway one can overcome this? The problem is that the id of
> the join table itself, is used as a foreign key in other tables that's
> why it cannot be deleted. I was thinking of saving the rows at the
> beginning, removing the association on the fly and then inserting the
> data (the old ones which weren't deselected and the new selected ones)
> manually.
>
> Any ideas?
>
> Thanks,
> Rami.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
http://www.wmonou.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to