|
|
|
@ -275,7 +275,10 @@ const parseConditionV2 = async (
|
|
|
|
|
return (_qb) => {}; |
|
|
|
|
} else if (column.uidt === UITypes.Lookup) { |
|
|
|
|
return await generateLookupCondition(column, filter, knex, aliasCount); |
|
|
|
|
} else if ([UITypes.Rollup,UITypes.Links].includes(column.uidt ) && !customWhereClause) { |
|
|
|
|
} else if ( |
|
|
|
|
[UITypes.Rollup, UITypes.Links].includes(column.uidt) && |
|
|
|
|
!customWhereClause |
|
|
|
|
) { |
|
|
|
|
const builder = ( |
|
|
|
|
await genRollupSelectv2({ |
|
|
|
|
knex, |
|
|
|
@ -447,9 +450,10 @@ const parseConditionV2 = async (
|
|
|
|
|
].includes(column.uidt) |
|
|
|
|
) { |
|
|
|
|
qb = qb.where((nestedQb) => { |
|
|
|
|
nestedQb |
|
|
|
|
.whereNot(field, val) |
|
|
|
|
.orWhereNull(customWhereClause ? _val : _field); |
|
|
|
|
nestedQb.whereNot(field, val); |
|
|
|
|
|
|
|
|
|
if (column.uidt !== UITypes.Links) |
|
|
|
|
qb.orWhereNull(customWhereClause ? _val : _field); |
|
|
|
|
}); |
|
|
|
|
} else if (column.uidt === UITypes.Rating) { |
|
|
|
|
// unset rating is considered as NULL
|
|
|
|
@ -469,9 +473,10 @@ const parseConditionV2 = async (
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
qb = qb.where((nestedQb) => { |
|
|
|
|
nestedQb |
|
|
|
|
.whereNot(field, val) |
|
|
|
|
.orWhereNull(customWhereClause ? _val : _field); |
|
|
|
|
nestedQb.whereNot(field, val); |
|
|
|
|
|
|
|
|
|
if (column.uidt !== UITypes.Links) |
|
|
|
|
qb.orWhereNull(customWhereClause ? _val : _field); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|