Hi Mina
Thanks a lot for the solution, exactly what I was looking for. Now I see the after the first .add the query.or is needed and I didn't realise that.
Just if someone looks (later on) at the code, there are two little things to adjust. The query.column.class_sign.eq(['fa', 'fb']) should of course read query.columns.class_sign.isin(['fa', 'fb']). And as a typo the s at columns is missing in the code.
mnaeimi wrote:You can try something like following:
var query = databaseManager.createSelect(datasources);
query.result.addPk();
query.where.add(
query.or
.add(
query.and
.add(query.columns.class_level_number.eq(4))
.add(query.columns.class_sign.isin(['ma','mb','mc','na','nb']))
)
.add(
query.and
.add(query.columns.class_level_number.eq(3))
.add(query.column.class_sign.eq(['fa', 'fb']))
)
);
Best regards,