FirebirdDialect: invalid limit strings when SQL comments are enabled
--------------------------------------------------------------------
Key: HHH-5470
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5470
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Environment: Hibernate 3.3.1, Firebird 2.1.3
Reporter: Aleš Smodiš
Attachments: FirebirdDialectTest.java,
hibernate-core-3.3.1-FirebirdDialect.patch
When using Hibernate with the Firebird database and configuring
{{hibernate.use_sql_comments=true}}, the FirebirdDialect inserts the keywords
"first" and "skip" at a fixed position in the given SQL clause with
the offset 6, which is okay when a plain SQL clause is given so the "select"
keyword is always there at the beginning, but produces invalid SQL clauses when commenting
inside SQL is enabled.
For example, when I enable comments in my project, the generated SQL is:
{code:sql}
/* cri first ?teria query */ select
this_.id as id0_0_,
this_.name as name0_0_
from
product this_
{code}
I've made a patch that corrects the issue, so e.g. the above example is generated
correctly:
{code:sql}
/* criteria query */ select
first ? this_.id as id0_0_,
this_.name as name0_0_
from
product this_
{code}
The patch and a test case for the issue are attached.
--
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