Skip to content

Instantly share code, notes, and snippets.

@sebersole
Last active September 10, 2015 17:20
Show Gist options
  • Save sebersole/b7608a0863c2f6e8750c to your computer and use it in GitHub Desktop.
Save sebersole/b7608a0863c2f6e8750c to your computer and use it in GitHub Desktop.
for ( Entry<Object, EntityEntry> objectEntityEntryEntry : entityEntryContext.reentrantSafeEntityEntries() ) {
// todo : I dont think this need be reentrant safe
if ( objectEntityEntryEntry.getKey() instanceof PersistentAttributeInterceptable ) {
final PersistentAttributeInterceptor interceptor = ( (PersistentAttributeInterceptable) objectEntityEntryEntry.getKey() ).$$_hibernate_getInterceptor();
if ( interceptor instanceof LazyAttributeLoader ) {
( (LazyAttributeLoader) interceptor ).unsetSession();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment