I noticed some code quite strange when trying to delete a model and its relations.
Indeed in model.php, function delete, line, 1399 we have :
$this->freeze();
then we try to remove relations
but in function get(), line 1068, we have :
if ($this->_frozen)
{
// avoid a notice, we're returning by reference
$var = null;
return $var;
}
It means that if the relation has not been used before the $mymodel->delete() call, it won't be deleted.
Hi there,
I noticed some code quite strange when trying to delete a model and its relations. Indeed in model.php, function delete, line, 1399 we have : $this->freeze();
then we try to remove relations
but in function get(), line 1068, we have : if ($this->_frozen) { // avoid a notice, we're returning by reference $var = null; return $var; }
It means that if the relation has not been used before the $mymodel->delete() call, it won't be deleted.
I might miss a point ?