Parameter « Criteria « JPA Q&A





1. Object identity and criteria parameters    forum.hibernate.org

Let's say we have two classes Customer and Order that have a connection between them. One Customer may have zero, one or many Orders associated. If I create a Criteria query to read the Orders of a specific Customer I would pass the Customer object as a parameter to the query. In the resulting set of Orders it seems that they ...

2. Reusing Criteria objects and changin criterion parameters    forum.hibernate.org

Hibernate version: 3.1.2 I have a situtation where I am retrieving blocks of data and then retrieving matching data from a second database. To do this I am using criteria objects with appended Restrictions.in(String, List) criterions to get the second lot of data. because I an getting the data in blocks I would like to reused the Criteria object. However there ...