-->
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.  [ 5 posts ] 
Author Message
 Post subject: jdbc-type="INTEGER" doesn't work ?
PostPosted: Wed Jan 10, 2007 7:03 am 
Newbie

Joined: Wed Jan 10, 2007 6:57 am
Posts: 4
I want to generate hbm mapping files from my hibernate reverse engeenering file but i get big_decimal type instead of integer, i don't udnerstand :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
<schema-selection match-schema="FC" />
<type-mapping>
<sql-type jdbc-type="INTEGER" hibernate-type="double" />
</type-mapping>
</hibernate-reverse-engineering>



Hibernate version: 3.2

<class name="com.mach.model.to.AccountingDocumentTO" table="ACCOUNTING_DOCUMENT" schema="FC">
<id name="docId" type="big_decimal">
<column name="DOC_ID_" precision="22" scale="0" />

<generator class="assigned" />
</id>


Name and version of the database you are using: ORACLE


THANK YOU.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 7:12 am 
Beginner
Beginner

Joined: Sat Dec 16, 2006 9:53 pm
Posts: 31
Location: Brisbane, Australia
<sql-type jdbc-type="INTEGER" hibernate-type="double" />

Oooooooooooooops he says.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 7:14 am 
Newbie

Joined: Wed Jan 10, 2007 6:57 am
Posts: 4
Yes you"re right ...sorry.
it's
<sql-type jdbc-type="INTEGER" hibernate-type="Integer" />

for information with double it doesn't work too.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 10:35 am 
Newbie

Joined: Wed Jan 10, 2007 6:57 am
Posts: 4
Any suggestions ?


thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 13, 2007 4:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
suggestion: ask tools question in the tools forum ;)

note, the reason big_decimal is chosen is because your INTEGER at db level can hold more than the java integer.

_________________
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.  [ 5 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.