[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3393?page=c...
]
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira