[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7070) Sybase15+ dialect -> dateadd, datediff, SQLFunctionTemplate lack templates
Stanimir Simeonoff (JIRA)
noreply at atlassian.com
Wed Feb 15 06:28:09 EST 2012
Sybase15+ dialect -> dateadd, datediff, SQLFunctionTemplate lack templates
--------------------------------------------------------------------------
Key: HHH-7070
URL: https://hibernate.onjira.com/browse/HHH-7070
Project: Hibernate ORM
Issue Type: Bug
Affects Versions: 3.6.10
Reporter: Stanimir Simeonoff
SybaseASE15Dialect dialect contains a lot of functions (datediff, dateadd just to mention few) defined as template ones but missing the template arguments. That results into absolutely wrong rendering.
for example the functions should be:
registerFunction( "dateadd", new SQLFunctionTemplate( StandardBasicTypes.TIMESTAMP, "dateadd(?1, ?2, ?3)" ) );
registerFunction( "datediff", new SQLFunctionTemplate( StandardBasicTypes.INTEGER, "datediff(?1, ?2, ?3)" ) );
morealso SQLFunctionTemplate shall not take no arguments function, that's it lacking '?' into the template. Such a change would allow detecting the errors fast.
A possible workaround is subclassing the Dialect and fixing the problem (something I presently do)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list