-->
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: Validation issue with Oracle float and java double
PostPosted: Wed May 29, 2013 5:58 pm 
Newbie

Joined: Wed Mar 24, 2010 10:32 am
Posts: 7
Hello,

I'm currently using Hibernate 4.1.4 with Oracle 10g and am running into issues when my Oracle data type is FLOAT and my java data type is double. When hbm2ddl.auto is set to validate I receive the following error:

Code:
org.hibernate.HibernateException: Wrong column type in TABLE_NAME for column column_name. Found: float, expected: double precision.


According to the Oracle docs located at http://docs.oracle.com/javadb/10.6.2.1/ref/rrefsqlj27281.html, FLOAT and DOUBLE PRECISION can be considered the same thing as long as the FLOAT's precision is sufficient. I'm currently using the default, 53, which is far more than enough for it to be treated as a DOUBLE PRECISION. So it looks to me like the validation should succeed, but it isn't. Is there a reason for this? Perhaps Hibernate doesn't have access to the precision and is failing defensively? Or is this a bug?

Thanks


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.