mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Wrong cast to query and childid propblem fix (#990)
This commit is contained in:
committed by
Rob Bygrave
parent
3051412d90
commit
a3dbd4538f
@@ -264,8 +264,8 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
|
||||
}
|
||||
|
||||
EbeanServer server = getBeanDescriptor().getEbeanServer();
|
||||
Query<?> q = (Query<?>) server.find(getPropertyType())
|
||||
.where().raw(expr, bindValues.toArray());
|
||||
Query<?> q = server.find(getPropertyType())
|
||||
.where().raw(expr, bindValues.toArray()).query();
|
||||
|
||||
return server.findIds(q, t);
|
||||
}
|
||||
|
||||
@@ -653,7 +653,9 @@ public final class DefaultPersister implements Persister {
|
||||
executeSqlUpdate(sqlDelete, t);
|
||||
} else {
|
||||
List<Object> childIds = expOne.findIdsByParentId(id, idList, t);
|
||||
deleteChildrenById(t, targetDesc, childIds, softDelete);
|
||||
if (childIds != null && !childIds.isEmpty()) {
|
||||
deleteChildrenById(t, targetDesc, childIds, softDelete);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user