-->
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.  [ 2 posts ] 
Author Message
 Post subject: @Column precision and scale for int with Oracle
PostPosted: Wed Nov 07, 2007 5:04 pm 
Newbie

Joined: Thu Dec 28, 2006 5:24 pm
Posts: 14
Hibernate version:Hibernate Core 3.2.5.ga, Hibernate Annotations 3.3.0 GA
Name and version of the database you are using: Oracle 10gR2

I have an Entity with an int field that has a min/max range of 0 to 360. As a result, I added @Range. Upon DDL generation, I noticed that it uses Number(10,0) because it is an int. So I added @Column(precision=3,scale=0) so that a Number(3,0) would be generated. Alas, I still get a Number(10,0).

Is that right?

I am trying to avoid using columnDefinition="Number(3,0)" because then it becomes Oracle specific. Why can't precision work for int fields too?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 04, 2008 3:21 am 
Newbie

Joined: Thu Dec 28, 2006 5:24 pm
Posts: 14
Ping.

I am trying to clean up my generated DDL as best I can without making my JPA Oracle specific.


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

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.