Support for disabling any kind of entity mapping and caching #4653
Replies: 3 comments 4 replies
-
This is very abstract, you will need to be much more concrete if we should take this forward. Let's start with what you mean by "entity mapper", you mean the hydration layer?
If this is a performance problem, you should start with a complete reproduction for that, so I can understand what problem are you dealing with. edit: moving to discussions before we settle on what should be done |
Beta Was this translation helpful? Give feedback.
-
Btw I guess you know about the https://mikro-orm.io/docs/entity-manager#disabling-identity-map-and-change-set-tracking |
Beta Was this translation helpful? Give feedback.
-
After revieweing the source code a bit, I am wondering that what we need might be |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
We use
em.fork()
compulsively for the following reasons:em.fork()
on every loop iteration.em.upsert
has different behavior depending on wether the entity mapper has seen the entity or not, which makes it hard to predict how it willl behave. Doc quoted below:Describe the solution you'd like
It would be great if we could totally disable the entitiy mapper and/or any other kind of peristence managed by mikro-orm beyond the operation we are executing.
Describe alternatives you've considered
For now we have decided to use query builders as much as possible because they work in a more comprehensive way, while still giving use the power of relational mapping of the database (code is easier and safer to write).
Additional context
mikro-orm
gives us, so we don't consider using alternatives.Beta Was this translation helpful? Give feedback.
All reactions