• 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic