Closed
Description
I am currently using symfony2 forms to create a form with many forms inside them.
I save data in a way where I just get the data and do some internal validation (I am not using anything else from symfony2).
I have placed some caching and now I hit this exception:
throw new RuntimeException(
'Entities passed to the choice field must be managed. Maybe '.
'persist them in the entity manager?'
);
In file symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php.
I have changed the source code and removed this exception and the code works as it did before. The entities are not managed but everything works just as well.
Is there anyway to bypass this this exception via switch or something?