Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entity manager #56

Open
DavKi opened this issue Apr 9, 2014 · 2 comments
Open

entity manager #56

DavKi opened this issue Apr 9, 2014 · 2 comments

Comments

@DavKi
Copy link

DavKi commented Apr 9, 2014

Hi,

I've got 2 user entities in my UserBundle and 2 groups. Each group has an attribute 'admin' (which is a one-to-many relationship) and an attribute 'users' (which is a many-to-many relationship).

In my group forms, i'd like to be able to choose an admin and several users.
My problem is when I do this, the inverse side of my relationships (users and admin) aren't update.
So I tried to pass the option 'by_reference => false' to my form fields. But now I have the following error :

"Entities passed to the choice field must be managed. Maybe persist them in the entity manager?"

So what I'd like to do know is pass the user manager to the form field, but the option 'em' requires a string as a parameter, and I don't know where to find the user manager name.

@leopro
Copy link
Member

leopro commented Apr 9, 2014

but the option 'em' requires a string as a parameter

try with 'default'

@DavKi
Copy link
Author

DavKi commented Apr 9, 2014

Default is not working, I'va already tried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants