if (object==LazyPropertyInitializer.UNFETCHED_PROPERTY) return false; //this is kinda the best we can do...
if ( object instanceof HibernateProxy ) {
// if its an uninitialized proxy it can't be transient
LazyInitializer li = ( (HibernateProxy) object ).getHibernateLazyInitializer();
if ( li.getImplementation(session) == null ) {
return false;
// ie. we never have to null out a reference to
// an uninitialized proxy
}
else {
//unwrap it
object = li.getImplementation();
}
}
// if it was a reference to self, don't need to nullify
// unless we are using native id generation, in which