mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Don't load default value if default value is not set
This commit is contained in:
parent
e83574a452
commit
a72e781e02
|
|
@ -2076,7 +2076,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
|
||||
if (isset(static::$ownsOne[$def['internal']])) {
|
||||
$default = null;
|
||||
if ($depth - 1 < 1) {
|
||||
if ($depth - 1 < 1 && $refProp->isInitialized($obj)) {
|
||||
$default = $refProp->getValue($obj);
|
||||
}
|
||||
|
||||
|
|
@ -2085,7 +2085,7 @@ class DataMapperAbstract implements DataMapperInterface
|
|||
$refProp->setValue($obj, $value);
|
||||
} elseif (isset(static::$belongsTo[$def['internal']])) {
|
||||
$default = null;
|
||||
if ($depth - 1 < 1) {
|
||||
if ($depth - 1 < 1 && $refProp->isInitialized($obj)) {
|
||||
$default = $refProp->getValue($obj);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user