Caused by: java.lang.RuntimeExceptionat com.avaje.ebean.server.core.DefaultBeanLoader.loadMany(DefaultBeanLoader.java:152)
The problem here is that the checking code assumed the join to the many was always going to effectively be an outer join.
That is not the case with a @Where in place.
Removing that check can result in:
java.lang.NullPointerException at com.avaje.ebean.common.BeanList.size(BeanList.java:394) at com.avaje.tests.batchload.TestEmptyManyLazyLoad.test(TestEmptyManyLazyLoad.ja
Here the code assumed that the list that was lazy loaded will be empty if there are no rows... but with the @Where the empty list is not set and the underlying list is still null after the lazy load.
Fixed in HEAD.