PUGXMultiUserBundle icon indicating copy to clipboard operation
PUGXMultiUserBundle copied to clipboard

entity manager

Open DavKi opened this issue 10 years ago • 2 comments

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.

DavKi avatar Apr 09 '14 16:04 DavKi

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

try with 'default'

leopro avatar Apr 09 '14 16:04 leopro

Default is not working, I'va already tried.

DavKi avatar Apr 09 '14 16:04 DavKi