-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
In case of update existing doctrine entity I cannot nullify target property even if it exists but set empty in importing item.
the most annoying case is for datetime item values :(
I suppose the following statement in DoctrineWriter->UpdateEntity()
if (isset($item[$fieldName])) {
$value = $item[$fieldName];
} elseif (method_exists($item, 'get' . ucfirst($fieldName))) {
$value = $item->{'get' . ucfirst($fieldName)};
}
if (null === $value) {
continue;
}
should be replaced to
if (array_key_exists($fieldName,$item)) {
$value = $item[$fieldName];
} elseif (method_exists($item, 'get' . ucfirst($fieldName))) {
$value = $item->{'get' . ucfirst($fieldName)};
} else {
continue;
}
Would you please explain if I'm wrong for some reasons?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels