#1498 - findIds() with @SoftDelete bean returns all Ids (when soft deleted ones should not return)

And fix delete permanent that cascades
This commit is contained in:
rob bygrave
2018-10-04 20:49:30 +13:00
parent f8b9ca2034
commit 31093babe3
6 changed files with 18 additions and 14 deletions
@@ -214,7 +214,7 @@ class CQueryBuilder {
SpiQuery<T> query = request.getQuery();
query.setSelectId();
BeanDescriptor<T> desc = request.getBeanDescriptor();
if (desc.isSoftDelete()) {
if (!query.isIncludeSoftDeletes() && desc.isSoftDelete()) {
query.addSoftDeletePredicate(desc.getSoftDeletePredicate(alias(query.getAlias())));
}
return buildFetchAttributeQuery(request);