Hibernate Version: 3.2.5
Sybase Database Version: 12.5.4
There appears to be an issue with the support of the modulo operator with regard to the SybaseDialect class. Sybase uses the '%' operator instead of the default implementation of the MOD function. This is true in the most recent version of Sybase (15.x) even though I am currently using 12.5.4. The fix is the same as the SQLServerDialect implementation which is to add the following to the SybaseDialect constructor:
Code:
registerFunction( "mod", new SQLFunctionTemplate( Hibernate.INTEGER, "?1 % ?2" ) );
I couldn't find a post regarding this, so perhaps it needs added to Jira?
--Tom