-->
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.  [ 4 posts ] 
Author Message
 Post subject: artifact generation for number(6)
PostPosted: Wed Oct 12, 2005 6:10 am 
Newbie

Joined: Wed Oct 12, 2005 5:35 am
Posts: 9
I am using the last version of hibernate tool - HibernateTools-3.1.0.N200510112341.zip and try to generate POJO and hbm.xml according oracle 9i database
there is such a table in database
create table A
(
A1 VARCHAR2(3),
A2 NUMBER(3),
A3 NUMBER(6)
)
the POJO can be generated out successfully, the type of A1 is string, A2 is short, but A3 is Integer. how can I get A3 to be int instead of Integer?

thanks a lot


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 6:34 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use a type mapping in reveng.xml

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 11:07 pm 
Newbie

Joined: Wed Oct 12, 2005 5:35 am
Posts: 9
I add the following in hibernate.reveng.xml
<type-mapping>
<sql-type jdbc-type="NUMERIC" precision="6" hibernate-type="int"/>
</type-mapping>
but it still doesn't work


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 13, 2005 1:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it should...i cant test it right now (in route to airport) ... put it in jira with the schema and the complete reveng.xml you are using

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.