I'd like to start by apologizing for my unfamiliarity with Hibernate. I'm only recently getting into it and am far from an expert.
I have three tables: Contract, Products, and a link table between them to define a many to many relationship.
I'm trying to write an HQL query to return all contracts that contain a range of products. Unfortunately, the IN
syntax works like an Any
instead of an All
. So if I want all contracts that have ProductA, ProductB, and ProductC, the IN
keyword will return me contracts that have any individual one of those products, instead of contracts that have all of them.
How should I structure my HQL query?