Add Criteria API to check collections for particular members
------------------------------------------------------------
Key: HHH-4629
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4629
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.5
Reporter: Chris Wilson
Attachments: hibernate-collection-contains.patch
Very few Criteria Restrictions apply to a collection. Currently as far as I can tell the
only relevant ones are Restrictions.isEmpty() and isNotEmpty(). It's pretty useful to
be able to check for a collection containing a particular value (object), like this:
org = session.createCriteria(Org.class);
org.add(Restrictions.contains("projects", project2));
assertEquals(Arrays.asList(new Org[]{org1, org2}), org.list());
The attached patch implements this.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira