Ok Andy, first of all many thanks for your reply.
What you wrote is very interesting, but I am not sure about a point: I
understand I can get two objects for the same entity during the same request
due to some implicit flush before a query (I think this behaviour is controlled
by hints), but wo
While the entities are all within the same navigation and request, you may get
different entities due to entity manager flushes when queries are run.
When you execute a query, it can flush the entity manager therefore
invalidating the entity manager entity cache.
For example :
| MyClass a