[DoctrineBridge] Improved exception message
This commit is contained in:
parent
99321cbe24
commit
db2ee54bda
@ -392,7 +392,10 @@ class EntityChoiceList extends ObjectChoiceList
|
||||
private function getIdentifierValues($entity)
|
||||
{
|
||||
if (!$this->em->contains($entity)) {
|
||||
throw new FormException('Entities passed to the choice field must be managed');
|
||||
throw new FormException(
|
||||
'Entities passed to the choice field must be managed. Maybe ' .
|
||||
'persist them in the entity manager?'
|
||||
);
|
||||
}
|
||||
|
||||
$this->em->initializeObject($entity);
|
||||
|
Reference in New Issue
Block a user