[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2593) Keyword UNION is prefixed with "this_." in filter conditions

Frederic Leitenberger (JIRA) noreply at atlassian.com
Mon Apr 30 12:36:04 EDT 2007


Keyword UNION is prefixed with "this_." in filter conditions
------------------------------------------------------------

                 Key: HHH-2593
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2593
             Project: Hibernate3
          Issue Type: Bug
          Components: query-hql, query-sql
    Affects Versions: 3.2.1
         Environment: Oracle 10g: org.hibernate.dialect.OracleDialect
Suse Linux
Hibernate: 3.2.1.ga
Hibernate Annotations: 3.2.1.GA
            Reporter: Frederic Leitenberger
            Priority: Trivial


I need to use a UNION-Subquery in a Filter condition unless HHH-298 is solved.
But anyway, when using the keyword "union" in the Filter condition it is prefixed with "this_.".

For instance, this ...
@Filter(name = "resellerFilter", condition = "(select cu.resellerId from Customer cu, GeoNumber gn where (cu.id = gn.customerId and gn.id = this_.geoNumberId) UNION select cu.resellerId  from Customer cu where cu.detemeTemplateId = this_.id) in (null, :resellerIds)")

... produces this ...

select
...
from
        DeTeMe this_ 
    where
        (
            select
                cu.resellerId 
            from
                Customer cu,
                GeoNumber gn 
            where
                (
                    cu.id = gn.customerId 
                    and gn.id = this_.geoNumberId
                ) this_.UNION select
                    cu.resellerId  
                from
                    Customer cu 
                where
                    cu.detemeTemplateId = this_.id
            ) in (
                null, ?
            ) 
            and this_.id = ?

-- 
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