From 3afc442cf0c596b6915102bcc8558feda9b590b3 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 14 Sep 2017 09:15:15 +0200 Subject: [PATCH] add space --- DataStorage/Database/DataMapperAbstract.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index 274418a3e..8fe38be08 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -1937,6 +1937,7 @@ class DataMapperAbstract implements DataMapperInterface // todo: this only works for belongsTo not for many-to-many relations. Implement many-to-many $obj[$value] = self::get(self::getPrimaryKeyBy($value, self::getColumnByMember($ref)), $relations, $fill); } + return count($obj) === 1 ? reset($obj) : $obj; } @@ -1967,6 +1968,7 @@ class DataMapperAbstract implements DataMapperInterface // todo: this only works for belongsTo not for many-to-many relations. Implement many-to-many $obj[$value] = self::getArray(self::getPrimaryKeyBy($value, self::getColumnByMember($ref)), $relations, $fill); } + return count($obj) === 1 ? reset($obj) : $obj; }