[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1043) Added HAVING Support to Criteria
Dustin Schultz (JIRA)
noreply at atlassian.com
Fri Oct 30 13:52:13 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dustin Schultz updated HHH-1043:
--------------------------------
Attachment: GroupByHavingProjection.java
Attaching GroupByHavingProjection which easily supports HAVING clauses with Criteria. Others can use this as a workaround or Hibernate could integrate this with very minimal changes. (Would love to see it in 3.5).
Usage as follows (using count distinct as an example):
criteria.setProjection(new GroupByHavingProjection("someProperty1", Projections.countDistinct("someProperty2"), "=", 2));
Hibernate (or yourself if you want to compile Hibernate) could easily add this to the Projections class.
> Added HAVING Support to Criteria
> --------------------------------
>
> Key: HHH-1043
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1043
> Project: Hibernate Core
> Issue Type: Patch
> Components: query-criteria
> Affects Versions: 3.1 rc 1
> Environment: 3.1 rc 1
> Reporter: Tony Voss
> Priority: Minor
> Attachments: criteria-having-improvement.patch, criteria-having-improvement.zip, GroupByHavingProjection.java
>
>
> I've added support for HAVING clauses to Criteria. Attached are my code changes.
--
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list