Hi all,

Today I've found that in my application when I try to edit one of my
models after save result is not that I expect.

My model has 4 hasAndBelongsToMany associations. When my model belongs
to all of them and while editing it I remove one of the associations to
other model there is a big mess after it in DB.

I looked into model_php5.php file and debug  "save" method. I've found
that in __saveMulti method there is no default value for empty $value
variable.
in code is:

if (!empty($newValues)) {
        $newValue[] = $newValues;
        unset($newValues);
}

and should be:

if (!empty($newValues)) {
        $newValue[] = $newValues;
        unset($newValues);
}
else {
        $newValue[] = '';
}

I hope that one of developers can add this to sources.

Regards,

Krzysiek


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to