/** * @param UserEntity $user * @return ContactEntity|boolean */ public function updateUser(UserEntity $user) { $contactEntity = $user->getContact(); if ($contactEntity instanceof ContactEntity) { $contactEntity->setUser($user); // set modified user entity return $this->contactRepository->save(TRUE, $contactEntity); } else { return FALSE; } }