Open BackEndTea opened 1 month ago
Hi @BackEndTea
I'm not very familiar with working with multiple entity managers in the same app.
Correct me if I'm wrong: when working with several EM, can you have two EM which "manages" the same entity? In your case one is readonly (the default one), and the other one has write access?
I'd be OK for such a modification, but I'm trying to figure out if a default_entity_manager
configuration is the best option :thinking:
what if we have 2 databases, with each of them 2 EM, this would not work... Not sure if this is a common setup (I've never seen this in the wild), but I wouldn't want to be stuck if some day someone comes with such a problem
Currently its not possible to specify the connection that is used by foundry for the inserts. This is a problem for me as the project i'm working on uses multiple connections, and the default connection may not have insert rights for the entity i want to persist.
In the flow of the application the correct connection would be used for inserts, but this is not possible to configure for foundry.
Right now we can already specify the connection/entity manger to be used for resets: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#database-reset
However we can't specify the connection that does the inserts. I would like something like