When {{EntityManager#getReference}} is called to obtain reference to an entity, currently what happens is: * If the entity is proxied we will load no state and the uninitialized entity reference is returned * If the entity is enhanced we load its non - lazy state immediately.
This is a request to allow the enhanced entity to be returned without even its non - lazy state yet loaded
-- -- h2. Original description
When using bytecode enhanced entities {{EntityManager.getReference}} does not seem to return a proxy but a fully initialized entity just like {{EntityManager.find}}. The example project comes with two maven profiles, the default activated one does enhancement. You can disable enhancement with the profile *no-enhancement* to see how it succeeds with non-enhanced entities. |
|