Given the following classes:
@Entity
public class Recipe {
@Id
@Column
private long id;
@ElementCollection
@CollectionTable(name = "recipe_ingredient", joinColumns = @JoinColumn(name = "id"))
private Set<String> ingredients;
...
}
How can I write the in JPA using the CriteriaQuery API the following: "Given a list of ingredients, return the Recipes that have at least all of the specified ingredients"