diff --git a/src/Mapper/UserHydrator.php b/src/Mapper/UserHydrator.php index 0305306..5d14765 100644 --- a/src/Mapper/UserHydrator.php +++ b/src/Mapper/UserHydrator.php @@ -61,7 +61,9 @@ public function hydrate(array $data, $object) throw new Exception\InvalidArgumentException('$object must be an instance of LmcUser\Entity\UserInterface'); } + if (isset($data['user_id'])) { $data = $this->mapField('user_id', 'id', $data); + } return $this->hydrator->hydrate($data, $object); }