|
Steve Ebersole Two things here: First, the enhancer behaves differently from instrumentation in regards to field/property access. AFAIK instrumentation only supports field, where enhancer has the same logic used elsewhere in hibernate (this was implemented in
HHH-10017
). In my quick look on the subject, both tests provided behave equally in that regard, but both failed!
Some debug led me to org.hibernate.engine.internal.Cascade#cascade( ... ) where there is a check "to avoid a lazy property initialization". The thing is that persister.getPropertyValue( ... ) does not trigger a load. I think it should be done the other way around: force the load of the association, although I can't really tell what will be the implications of that.
|