mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1722 - Fix for - L2 cache throw exception when query with custom ManyToMany relation model
This commit is contained in:
1 parent
d1314124af
commit
8a4ffd21ab
1 file changed
+8
-7
@@ -346,19 +346,20 @@ public final class IdBinderEmbedded implements IdBinder {
|
||||
public Object read(DbReadContext ctx) throws SQLException {
|
||||
|
||||
EntityBean embId = idDesc.createEntityBean();
|
||||
boolean notNull = true;
|
||||
boolean nullValue = true;
|
||||
|
||||
for (BeanProperty prop : props) {
|
||||
Object value = prop.readSet(ctx, embId);
|
||||
if (value == null) {
|
||||
notNull = false;
|
||||
Object value = prop.read(ctx);
|
||||
if (value != null) {
|
||||
prop.setValue(embId, value);
|
||||
nullValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (notNull) {
|
||||
return embId;
|
||||
} else {
|
||||
if (nullValue) {
|
||||
return null;
|
||||
} else {
|
||||
return embId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user