[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5265?page=c...
]
Matthias Bosshard edited comment on HHH-5265 at 12/23/10 9:47 AM:
------------------------------------------------------------------
I finally found the problem. If there is a white-space between ISNULL and the parenthesis,
the isFunction method in the Template class returns a false.
So when I remove the spaces it works for me. But it should working with and without
white-spaces.
was (Author: mbosshard):
I finally found the problem. If there is a white-space between ISNULL and the ( than
isFunction method in the Template class returns a false.
So when I remove the spaces it works for me now. But it should working with and without
white-spaces.
@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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira