Skip to content

Instantly share code, notes, and snippets.

@gbadner
Created April 29, 2019 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gbadner/a9cb2b5547aeddf96c36cb6108e72403 to your computer and use it in GitHub Desktop.
Save gbadner/a9cb2b5547aeddf96c36cb6108e72403 to your computer and use it in GitHub Desktop.
Cases for HibernateProxy with enhancement
Enhanced Enhanced
allow_enhancement_as_proxy=true allow_enhancement_as_proxy=false Non-enhanced
Session#load: returns uninitialized, enhanced entity return enhanced entity that return entity
(entity/proxy (per HHH-11147) implements HibernateProxy that implements
not in PC HibernateProxy
yet)
LazyToOne:
FALSE Eagerly Loaded Eagerly Loaded Eagerly Loaded
PROXY ??? (currently eagerly loaded) Association is loaded Association is
as an enhanced entity that loaded as an entity
implements HibernateProxy that implements
HibernateProxy
NO_PROXY Lazily loads association when Lazily loads association when Eagerly loaded
accessed (no HibernateProxy) accessed (no HibernateProxy) (no HibernateProxy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment