... and probably HasMany relations neither looking at the code...
These lines (Core_Model line 353 - don't know why they have been added from the original Jelly) :
// Set an empty value to NULL for deleting relationships
if (($field instanceof Jelly_Field_HasMany OR $field instanceof Jelly_Field_ManyToMany) AND empty($value))
{
$value = NULL;
}
Actually set a the manytomany field to NULL, so the field is reported as 'changed' with a NULL value. If you then try to add a new relation, then this line (942) in the _change() method will trigger an exception as it will run array_merge with a NULL parameter :
if ($add)
{
$changes = array_unique(array_merge($current, $changes));
}
... and probably HasMany relations neither looking at the code...
These lines (Core_Model line 353 - don't know why they have been added from the original Jelly) :
Actually set a the manytomany field to NULL, so the field is reported as 'changed' with a NULL value. If you then try to add a new relation, then this line (942) in the _change() method will trigger an exception as it will run array_merge with a NULL parameter :