filter « Relationship « JPA Q&A





1. Patch to filter many-to-one relationships ?    forum.hibernate.org

I would like to be able to filter many-to-one relationships. The reason for this is that I have two tables (parent and child) with bi-directional "one to many" - "many to one" relationship between them. However this is only true when a filter is applied. When the filter is disabled the relationship becomes a: many-to-one-to-many Where the "one" is a phantom ...

2. Criteria filter on a many to many relationship    forum.hibernate.org

Expression.in is a valid restriction in your case if you wanted to make sure that the item brand was in a given store. This is if you were checking that the item is in MANY stores, not just one. The first argument to the method is the column of which you want to query against, and the second is a array ...