"Not in" constraint using JPA criteria
28,602
builder.not(root.get({field_name}).in(seqs))
seqs is collection.
Related videos on Youtube
Author by
P.S.
Updated on March 22, 2020Comments
-
P.S. about 4 years
I am trying to write a
NOT IN
constraint usingJPA Criteria
. I've tried something like this:builder.not(builder.in(root.get(property1)));
though I know it will not work. In the above syntax, how can I add the collection / list against which
property1
that will be checked? -
delbertooo over 6 yearsAlso possible:
root.get({field_name}).in(seqs).not()