-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Modulo Operator Issue with SybaseDialect
PostPosted: Mon Aug 20, 2007 4:04 pm 
Newbie

Joined: Mon Aug 20, 2007 3:49 pm
Posts: 1
Location: Westerville, OH
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.