[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2045?page=c...
]
Tuukka Mustonen commented on HHH-2045:
--------------------------------------
Using Hibernate 3.4.0 GA for JPA and just got this issue. It sounds like a very common
case, yet I there are not too many comments here or Google hits for it.
How are you supposed to act with empty lists? Always build queries dynamically when there
is possibility for empty lists? That makes me really sad.
It sounds logical to have support for this in product: if list is empty, drop the clause
from query. But I guess that's forbidden in JPA spec and maybe in Hibernate world as
well?
in () result in "unexpected end of subtree"
--------------------------------------------
Key: HHH-2045
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2045
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.0.cr4
Reporter: Max Rydahl Andersen
Assignee: Steve Ebersole
Priority: Minor
"in ()" is a valid sql construct and works with previous versions of Hibernate.
The new parser throws an "unexpected end of subtree".
example:
from Animal an where an.id in ()
or
from Animal an where an.id in (:list)
and input list is an empty list.
Is this the behavior we want from now on or ?
--
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