[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3788?page=c...
]
Rafael Santini commented on HHH-3788:
-------------------------------------
Diego,
I have extended the FirebirdDialect to workaround this problem:
Class:
package br.com.biblioshop.framework.hibernate.dialect;
import org.hibernate.Hibernate;
import org.hibernate.dialect.function.NoArgSQLFunction;
public class FirebirdDialect extends org.hibernate.dialect.FirebirdDialect {
public FirebirdDialect() {
super();
registerFunction("current_date", new
NoArgSQLFunction("current_date", Hibernate.DATE, false));
}
}
Configuration:
<prop
key="hibernate.dialect">br.com.biblioshop.framework.hibernate.dialect.FirebirdDialect</prop>
FirebirdDialect: current_date() function
----------------------------------------
Key: HHH-3788
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3788
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.3.1
Environment: 3.3.1, Firebird 1.5
Reporter: Rafael Santini
The FirebirdDialect does not supports current_date() function. A select like "select
* from test where dt < current_date()" causes the following exception:
---
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic SQL
Error
SQL error code = -104
Token unknown - line 1, column X
(
---
In MySQLDialect.java there is:
registerFunction("current_date", new NoArgSQLFunction("current_date",
Hibernate.DATE, false) );
But in InterbaseDialect.java or FirebirdDialect.java there is not the current_date
function.
--
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