findMap() with beanCache should use idPoperty if mapKey = null

This commit is contained in:
Noemi Szemenyei committed 2021-11-19 11:53:37 +01:00
1 parent 5807874c9e
commit 60d0a3da39
2 files changed
+38 -1

No files matched your search

@@ -570,7 +570,12 @@ public final class OrmQueryRequest<T> extends BeanRequest implements SpiOrmQuery
}
private ElPropertyValue mapProperty() {
ElPropertyValue property = beanDescriptor.elGetValue(query.getMapKey());
ElPropertyValue property;
if (query.getMapKey() == null) {
property = beanDescriptor.idProperty();
} else {
property = beanDescriptor.elGetValue(query.getMapKey());
}
if (property == null) {
throw new IllegalStateException("Unknown map key property " + query.getMapKey());
}