Le 01/06/2011 10:02, Artem Lopata a écrit :
The case of doing this is : write to master read from slave.
In this case I need to map all my entities to two entity managers.

Yes, I understand that this will cause different objects,
but the app is working when I list all my entities in two entity
managers.

And seems the code which process "auto_mapping: true" is just doing
same thing.

Artem.
The issue is that you get 2 different objects, one for each UnitOfWork. So if you read an object from the slave database and modify it, you will not be able to flush the changes to the master database. You would need to get the object from the master database (doing a query for this), reflect the changes in it and flush the master one.

--
Christophe | Stof

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to