Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sebersole/f2c000c50cce19ab01c50a6a8fa1640b to your computer and use it in GitHub Desktop.
Save sebersole/f2c000c50cce19ab01c50a6a8fa1640b 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