[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3393) Criteria API property between capability for Subqueries
Will Hoover (JIRA)
noreply at atlassian.com
Tue Jul 22 12:46:12 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30709 ]
Will Hoover commented on HHH-3393:
----------------------------------
An interim solution until this issue is resolved is:
{code}
protected static final Conjunction createPropertyBetweenSubqueryExpression(final String property, final DetachedCriteria firstBetweenCriteria, final DetachedCriteria secondBetweenCriteria) {
final Conjunction betweenConjunction = Restrictions.conjunction();
betweenConjunction.add(new PropertySubqueryExpression(property, "between", null, firstBetweenCriteria) {
private static final long serialVersionUID = 1L;
});
betweenConjunction.add(new SubqueryExpression(null, null, secondBetweenCriteria) {
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
protected final String toLeftSqlString(final Criteria criteria, final CriteriaQuery outerQuery) {
return "";
}
});
return betweenConjunction;
}
{code}
> Criteria API property between capability for Subqueries
> -------------------------------------------------------
>
> Key: HHH-3393
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3393
> Project: Hibernate3
> Issue Type: Bug
> Components: query-criteria
> Environment: N/A
> Reporter: Will Hoover
> Original Estimate: 5 minutes
> Remaining Estimate: 5 minutes
>
> org.hibernate.criterion.Subqueries should have a method for a between clause:
> public static Criterion propertyBetween(String propertyName, DetachedCriteria dc) {
> return new PropertySubqueryExpression(propertyName, "between", null, dc);
> }
--
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