-->
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: Reverse Engineering Problem: Type-mapping not working.
PostPosted: Sat Oct 31, 2009 1:05 am 
Newbie

Joined: Fri Oct 30, 2009 8:58 am
Posts: 2
I've been having ill luck while trying generate mapping files and pojos thru the reverse engineering process from my Oracle Database using Hibernate Tools. The process is being completed successfully but datatypes are a mess.

If I am having an attribute with type NUMBER(1) it is being mapped as java.lang.Boolean !! Where as I am expecting it to be mapped by long.

I have tried controlling the reverse engineering process using :
Code:
<type-mapping>
<sql-type jdbc-type="NUMERIC" precision='1' hibernate-type="long" />
</type-mapping>


But still nothing changes. I have tried with various datatypes like DECIMAL, INTEGER etc. also. It is still doing the default mapping. How can I correct this ?

Hibernate Tools Ver: 3.2.4,
Eclipse ver: 3.4.2,

Please guide.

Regards,
Rajesh Rapaka.


Top
 Profile  
 
 Post subject: Re: Reverse Engineering Problem: Type-mapping not working.
PostPosted: Mon Nov 02, 2009 3:33 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Try to use
<type-mapping>
<sql-type jdbc-type="NUMERIC" hibernate-type="long" />
</type-mapping>
or
<type-mapping>
<sql-type jdbc-type="NUMERIC" length='1' hibernate-type="long" />
</type-mapping>


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.