-->
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: Using Numbers as Sequences in Oracle
PostPosted: Fri Nov 14, 2003 3:33 am 
Regular
Regular

Joined: Mon Oct 06, 2003 1:59 am
Posts: 52
Hi Folks,

The tables on which I have to map my objects are using Oracle Number for all primary key fields. On some tables Oracle native sequences are installed.

I'm using java.math.BigDecimal to represent the Numbers in my POJOs.
Unfortunatly hibernate supports long, short and int for sequences only.

Can I easily get around this limitation, if yes how?

Thx
Toby

_________________
"Wisest of the Maia was Ol


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2003 3:41 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Yes, its easy; just write a custom IdentifierGenerator


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2003 5:25 am 
Regular
Regular

Joined: Mon Oct 06, 2003 1:59 am
Posts: 52
gavin wrote:
Yes, its easy; just write a custom IdentifierGenerator


Thanks Gavin. It was really farily easy. I guess it will work. I'm gonna testing is in a new minutes.

Is this a extension usefull for others? Or is it to exotic? BTW the idea of using numbers is not from me ;-)

Bye
Toby

_________________
"Wisest of the Maia was Ol


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2003 6:54 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Post it in the wiki

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 14, 2003 7:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
I think its exotic ;)

But by all means post it to the Wiki, the more examples of how to do exocitc "stuff", the better!


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.