[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4772) Empty conjunction/disjunction in criteria does not follow spec rules
Steve Ebersole (JIRA)
noreply at atlassian.com
Fri Jan 8 22:55:29 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35162#action_35162 ]
Steve Ebersole commented on HHH-4772:
-------------------------------------
The fix should be as simple as adding the following check while rendering a CompoundPredicate:
{code}
if ( getExpressions().size() == 0 ) {
return getOperator() == Predicate.BooleanOperator.AND
? "true"
: "false";
}
{code}
> Empty conjunction/disjunction in criteria does not follow spec rules
> --------------------------------------------------------------------
>
> Key: HHH-4772
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4772
> Project: Hibernate Core
> Issue Type: Bug
> Components: entity-manager, query-criteria
> Affects Versions: 3.5.0-Beta-2
> Reporter: Steve Ebersole
> Assignee: Steve Ebersole
> Fix For: 3.5.0-Beta-3
>
>
> According to spec, an empty conjunction (AND) should always resolve to true while an empty disjunction (OR) should always resolve to false.
--
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