-->
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: how to create second sequence in hibernate
PostPosted: Wed Jan 10, 2007 1:33 am 
Newbie

Joined: Wed Jan 10, 2007 12:47 am
Posts: 4
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Am new to hibernate. Am using hibernate version3.0.
I used "sequence" keyword in generator tag of id.
Now i want to use another sequence which is different from this sequence.
As far as i know, there will be only sequqnce "HIBERNATE_SEQUENCE" created for any sequences in the hbm.xml files.

So for that i created a sequence manualy and also created a trigger for getting the sequence next value while inserting into a table.

Now my problem is how to use that sequence or trigger while inserting data into a table.

I will be very thankful if i can be given with an example.
Awaiting your response.


Am using Oracle 10g as back end.


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

Joined: Sat Dec 16, 2006 9:53 pm
Posts: 31
Location: Brisbane, Australia
Dood, can't you just specify the column name for the second sequence column in your hbm.xml... or would that be too easy?


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.