[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5265) @Formula adds a this_. prefix to an SQL function

Matthias Bosshard (JIRA) noreply at atlassian.com
Wed May 26 05:01:57 EDT 2010


@Formula adds a this_. prefix to an SQL function
------------------------------------------------

                 Key: HHH-5265
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5265
             Project: Hibernate Core
          Issue Type: Bug
          Components: annotations, core
    Affects Versions: 3.5.2
         Environment: Hibernate 3.5.2, with a SQL Anywhere 10 and the org.hibernate.dialect.SybaseDialect
            Reporter: Matthias Bosshard


With Hibernate 3.5.2 the ISNULL/COALESCE SQL statement in the following @Formula is prefixed with a this_. An so its no valid SQL.

The annotation:
@Formula( "(SELECT ISNULL ( (SELECT 1 WHERE EXISTS (SELECT * FROM org.usertable as user WHERE user.user_id = user_id)), 0))" )

The SQL part for this formula:
(SELECT *this_.ISNULL* ( (SELECT 1 WHERE EXISTS (SELECT * FROM                            org.usertable as user WHERE user.user_id = this_.user_id)), 0)) as formula8_1_,

-> thats invalid SQL


In Hibernate 3.5.1 the SQL is pretty the same, but without this_. before ISNULL.
(SELECT *ISNULL* ( (SELECT 1 WHERE EXISTS (SELECT * FROM org.usertable as user WHERE user.user_id = this_.user_id)), 0)) as formula8_1_,




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