-->
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: Cast MySQL float field to long
PostPosted: Mon Nov 29, 2010 10:30 am 
Newbie

Joined: Sat Mar 27, 2010 11:51 am
Posts: 6
Hi,

I found a proble with hibernate: I'm able to cast a float field into an integer in a hql query, but in some case the field contains a value greater than the capapility of integer (ex. 435.000.000.000) and I get an error on my log.

I try to cast the field to long but hibernate throws an Exception.

How can I solve it without change the field type on mysql schema?


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.