Trying to load the entities of a @OneToMany relation with the @Loader annotation and a @NamedNativeQuery causes a NullPointerException
java.lang.NullPointerException: null at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:261) at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.takeCollectionSizeSnapshot(LazyAttributeLoadingInterceptor.java:186) at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.access$000(LazyAttributeLoadingInterceptor.java:36) at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor$1.doWork(LazyAttributeLoadingInterceptor.java:111) at org.hibernate.bytecode.enhance.spi.interceptor.Helper.performWork(Helper.java:97) at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.loadAttribute(LazyAttributeLoadingInterceptor.java:76) at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.fetchAttribute(LazyAttributeLoadingInterceptor.java:72) at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.intercept(LazyAttributeLoadingInterceptor.java:61) at org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.readObject(LazyAttributeLoadingInterceptor.java:296)
|