Skip to content

[Proposal] Exception 'Entities passed to the choice field must be managed.' - Code works just fine without this being thrown maybe have switch to bypass #13964

Closed
@AntonioCS

Description

@AntonioCS

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions