These are chat archives for hibernate/hibernate-orm
PersistenceContext.contains( id, persisterOrdinal)rather than
PersistenceContext.contains( makeEntityKey( id, persister) ).. no big deal? and less allocations.
contains( EntityKey )is obviously superior. Still, you might need to figure out "where do I get the EntityKey from?"
contains( EntityKey )and also a
contains( EntityEntry )and
contains( id, persister ).. if I understand you correctly, I'd consider that API less nice than having just one of them.
containsoperation is actually one of the bottlenecks ;-)
containsrequest without actually allocating the key object first.
EntityEntryinstance - which is very large - with some very small object, which only has essentially the usual couple to identify what exactly is being placeholded for
The idea was to use a single(ton) EntityEntry instance for all the uninitialized cases. But the end-game is the same no matter what, we need to be able to resolve the "entity key" info given a EntityEntry.
I don't think forcing some other type of object into the EntityEntry maps is a good choice. You are just asking for problems imho.