> Isn't an alarm bell ringing that you're calling a method called
> saveAll and wanting it to delete?

Well yes and no. When you are saving say an article, you use saveAll
to save the article with all its tags, comments and all. These are not
HABTM, but simple 1:n hasMany relationships. So when a user has
deleted a tag with the article, saving of the changes actually means
deleting the tag (that is, the record that says that tag X belongs to
articly Y).

This is what the normal forms imply. The tag-to-article table in this
example is fully dependent on the article record. When I save the
article together with all its tags (saveAll), there should be no tags
in the database that are not in this save, but still connected to the
article.

Maybe a better name for the function should be "replaceAll" or
"saveFull" or something, but it really is what one expects to happen.
Right?
--~--~---------~--~----~------------~-------~--~----~
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