Skip to content

orOperator is not working as expected #11

Description

@HamzaAburaneh

I am trying to make a backend or query that takes 3 criteria's and searches for them in my DB with an or search meaning if any of the 3 criteria's match a row then it will be shown. When I try to use orOperator to chain the queries it is not producing the correct result. I am trying to find all entries with comments in any of those 3 columns, however it always returns a smaller amount then if I just ran one query, but with or, it should always be more entries when I use all 3 queries with or, any help is appreciated!

Criteria two = where("taskWhyNotComment").exists(true).ne("");
Criteria three = where("taskImproveComment").exists(true).ne("");
Criteria allWithOr = one.orOperator(two,three);
input.getColumn("taskOther").get().getSearch().setValue("");
return topTaskRepository.findAll(input, allWithOr);```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions