mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Merge pull request #2442 from FOCONIS/findmap-with-beancache-without-mapkey
findMap() with beanCache should use idPoperty if mapKey = null
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user