EJB-454 implements the default PPR strategy
EJB-453 use resolver held by PPRH fix issues with Hibernate's isLoaded git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17201 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
49e53e81e1
commit
c05509be7c
|
@ -170,13 +170,21 @@ public class HibernatePersistence implements javax.persistence.spi.PersistencePr
|
||||||
final boolean isInitialized = interceptor == null || interceptor.isInitialized( property );
|
final boolean isInitialized = interceptor == null || interceptor.isInitialized( property );
|
||||||
LoadState state;
|
LoadState state;
|
||||||
if (isInitialized && interceptor != null) {
|
if (isInitialized && interceptor != null) {
|
||||||
state = LoadState.LOADED;
|
//property is loaded according to bytecode enhancement, but is it loaded as far as association?
|
||||||
|
//it's ours, we can read
|
||||||
|
state = isLoaded( get( entity, property ) );
|
||||||
|
//it's ours so we know it's loaded
|
||||||
|
if (state == LoadState.UNKNOWN) state = LoadState.LOADED;
|
||||||
}
|
}
|
||||||
else if ( interceptor != null && (! isInitialized)) {
|
else if ( interceptor != null && (! isInitialized)) {
|
||||||
state = LoadState.NOT_LOADED;
|
state = LoadState.NOT_LOADED;
|
||||||
}
|
}
|
||||||
else if ( sureFromUs ) { //interceptor == null
|
else if ( sureFromUs ) { //interceptor == null
|
||||||
state = LoadState.LOADED;
|
//property is loaded according to bytecode enhancement, but is it loaded as far as association?
|
||||||
|
//it's ours, we can read
|
||||||
|
state = isLoaded( get( entity, property ) );
|
||||||
|
//it's ours so we know it's loaded
|
||||||
|
if (state == LoadState.UNKNOWN) state = LoadState.LOADED;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
state = LoadState.UNKNOWN;
|
state = LoadState.UNKNOWN;
|
||||||
|
|
Loading…
Reference in New Issue