mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
For #2038 - updated from 12.3.6 to 12.3.7 - NPE BeanDescriptor.findPropertyFromPath(BeanDescriptor.java:1965) (#2047)
* #2038 - lazy loading ToMany with path * #2038 - Failing test for NPE BeanDescriptor.findPropertyFromPath(BeanDescriptor.java:1965) * #2038 Refactor internals DbReadContext use BeanPropertyAssocMany
This commit is contained in:
@@ -283,8 +283,8 @@ public class DLoadContext implements LoadContext {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(String path, BeanCollection<?> bc) {
|
||||
getManyContext(path).register(bc);
|
||||
public void register(String path, BeanPropertyAssocMany<?> many, BeanCollection<?> bc) {
|
||||
getManyContext(path, many).register(bc);
|
||||
}
|
||||
|
||||
DLoadBeanContext getBeanContext(String path) {
|
||||
@@ -315,11 +315,12 @@ public class DLoadContext implements LoadContext {
|
||||
}
|
||||
}
|
||||
|
||||
DLoadManyContext getManyContext(String path) {
|
||||
if (path == null) {
|
||||
throw new RuntimeException("path is null?");
|
||||
}
|
||||
return manyMap.computeIfAbsent(path, p -> createManyContext(p, defaultBatchSize, null));
|
||||
DLoadManyContext getManyContext(String path, BeanPropertyAssocMany<?> many) {
|
||||
return manyMap.computeIfAbsent(path, p -> createManyContext(p, many, defaultBatchSize));
|
||||
}
|
||||
|
||||
private DLoadManyContext createManyContext(String path, BeanPropertyAssocMany<?> many, int batchSize) {
|
||||
return new DLoadManyContext(this, many, path, batchSize, null);
|
||||
}
|
||||
|
||||
private DLoadManyContext createManyContext(String path, int batchSize, OrmQueryProperties queryProps) {
|
||||
|
||||
Reference in New Issue
Block a user