• Post Reply Bookmark Topic Watch Topic
  • New Topic

"Not in" constraint using JPA criteria

 
Pooja Shah
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to write a "NOT IN" constraint using JPA Criteria.
Ive tried something like this -
builder.not(builder.in(root.get(property1)));
though i know it will now work.
In the above syntax, how can i add the collection/list against which "property1" will be checked?

Any suggestions will help.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!