I have a database of templates :
Fields : Name, Identifier, Type, Version
Now, I have a filter query, wherein from the UI, I would get values of Type and Version.
Now, I have to get those templates from the DB that matches the values given from the UI.
How Can I do it using ExampleMatcher
Trials :
When I use ExampleMatcher.matching()
, It fetches all the templates that have the type OR version values that matches those given by UI.
But, I want those templates that have the type AND version values that matches those given by UI.
Note the use of OR and AND in the above scenario.
When I use ExampleMatcher.matchingAll()
, It doesn't fetch any template as the values given for Name and Identifier is null from UI and those values are not there in any of the template.
How can I implement Filtering here?