-->
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.  [ 7 posts ] 
Author Message
 Post subject: Hibernate Type for Orace Long Type?
PostPosted: Wed Mar 03, 2004 3:22 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
We want to map one of our bean property with Oracle Long type, but could not find any compatible Hibernate type for it to mention in Hibernate Mapping File.

We also go through the class docmentation of Hibernate for various types, but there is no type mapped with Oracle.Long.

Please tell what type should be used for this requirement? It is urgent.

_________________
Mohit Gupta
Software Engineer
Gurgaon, India


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 5:12 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
type="java.lang.Long" ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 5:17 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
Michael, if we use type = long in mapping file then Hibernate creates a number type of column in oracle db, but we want Long type column. like:

<property name="definition_Long" column="definition" type="long"/>

Now hibernate schema export tool will create a column of type Number. So what type should we give here to map it with DB. Long?

_________________
Mohit Gupta
Software Engineer
Gurgaon, India


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 5:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try working with the sql-type attribute, see here http://www.hibernate.org/hib_docs/reference/html/toolsetguide.html#toolsetguide-s1-2 - never used Oracle so I can't tell you the exact solution, probably someone else?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 5:48 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
Thanks Michael. I got the solution from link given by you. sql-type tag is working.

_________________
Mohit Gupta
Software Engineer
Gurgaon, India


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2004 5:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
What is the solution? :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 04, 2004 3:42 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 6:59 am
Posts: 47
Location: Gurgaon, India
Michael, soln is :

<property name="definition_long" type="long">
<column name="definition" sql-type="long"/>
</property>

It created Long column in database.

_________________
Mohit Gupta
Software Engineer
Gurgaon, India


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