[DoctrineBridge] Improve exception message at IdReader::getIdValue()
This commit is contained in:
parent
923417122a
commit
5e98478d94
@ -95,10 +95,7 @@ class IdReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->om->contains($object)) {
|
if (!$this->om->contains($object)) {
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(sprintf('Entity of type "%s" passed to the choice field must be managed. Maybe you forget to persist it in the entity manager?', get_class($object)));
|
||||||
'Entities passed to the choice field must be managed. Maybe '.
|
|
||||||
'persist them in the entity manager?'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->om->initializeObject($object);
|
$this->om->initializeObject($object);
|
||||||
|
Reference in New Issue
Block a user