Tuesday, February 24, 2009

Problem with cascade deleting in cake_1.2.1.8004.

I have a HABTM relationship and when I delete the main row, only the
1st related row gets deleted and the delete fails. The problem seems
to be in the model::exists() function after calling from the start of
the model::del() function (line 1671). The 1st time __exists is not
set and reset is false so a database query is performed on the
intersection table. Subsequently, __exists is set so the previous
value is returned (line 1852), even when a new ID has been set. This
is clearly wrong. The delete succeeds when the call to the exists()
function (on line 1671) is supplied with a value of true for $reset.
Comments?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: