mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 22:38:42 +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']])) {
|
if (isset(static::$ownsOne[$def['internal']])) {
|
||||||
$default = null;
|
$default = null;
|
||||||
if ($depth - 1 < 1) {
|
if ($depth - 1 < 1 && $refProp->isInitialized($obj)) {
|
||||||
$default = $refProp->getValue($obj);
|
$default = $refProp->getValue($obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2085,7 +2085,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
$refProp->setValue($obj, $value);
|
$refProp->setValue($obj, $value);
|
||||||
} elseif (isset(static::$belongsTo[$def['internal']])) {
|
} elseif (isset(static::$belongsTo[$def['internal']])) {
|
||||||
$default = null;
|
$default = null;
|
||||||
if ($depth - 1 < 1) {
|
if ($depth - 1 < 1 && $refProp->isInitialized($obj)) {
|
||||||
$default = $refProp->getValue($obj);
|
$default = $refProp->getValue($obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user