[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4053?page=c...
]
Ali Tekin commented on HHH-4053:
--------------------------------
The problem is that in the Dialect.java line 210 it reads as:
...
registerFunction( "substring", new SQLFunctionTemplate( Hibernate.STRING,
"substring(?1, ?2, ?3)" ) );
...
This line should be overwritten in FirebirdDialect.java as:
...
registerFunction("substring", new SQLFunctionTemplate(new StringType(),
"substring(?1 from ?2 for ?3)"));
...
I have created a CustomFirebirdDialect class and tested it, it worked charmly.
Incorrect SQL with substring for Firebird
-----------------------------------------
Key: HHH-4053
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4053
Project: Hibernate Core
Issue Type: Bug
Components: query-sql
Affects Versions: 3.3.1
Reporter: Vlad Tsepelev
HQL query substring function generate incorrect SQL query for Firebird.
In Firebird SQL query with substring has follow syntax: substring(str from 1 for 3).
Generated ин Hibernate query looks like: substring(str, 1, 3).
--
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