diff --git a/DataStorage/Database/Mapper/DataMapperFactory.php b/DataStorage/Database/Mapper/DataMapperFactory.php index c852e9401..18988b8bd 100755 --- a/DataStorage/Database/Mapper/DataMapperFactory.php +++ b/DataStorage/Database/Mapper/DataMapperFactory.php @@ -426,8 +426,8 @@ class DataMapperFactory /** * Get id of object * - * @param object $obj Model to create - * @param string $member Member name for the id, if it is not the primary key + * @param object $obj Model to create + * @param string $member Member name for the id, if it is not the primary key * @param null|\ReflectionClass $refClass Reflection class * * @return mixed diff --git a/DataStorage/Database/Mapper/ReadMapper.php b/DataStorage/Database/Mapper/ReadMapper.php index e05fc5a90..5d015fb0d 100755 --- a/DataStorage/Database/Mapper/ReadMapper.php +++ b/DataStorage/Database/Mapper/ReadMapper.php @@ -699,9 +699,9 @@ final class ReadMapper extends DataMapperAbstract } if (\stripos($member, '/') !== false) { - $hasPath = true; - $path = \explode('/', $member); - $member = $path[0]; + $hasPath = true; + $path = \explode('/', $member); + $member = $path[0]; if ($isPrivate) { $refProp = $refClass->getProperty($path[0]); @@ -711,7 +711,7 @@ final class ReadMapper extends DataMapperAbstract $arrayPath = \implode('/', $path); $aValue = $isPrivate ? $refProp->getValue($obj) : $obj->{$path[0]}; } elseif ($isPrivate) { - $refProp = $refClass->getProperty($member); + $refProp = $refClass->getProperty($member); } if (\in_array($def['mapper']::COLUMNS[$column]['type'], ['string', 'int', 'float', 'bool'])) {