-->
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.  [ 6 posts ] 
Author Message
 Post subject: using sequence generator for non primary-key fields
PostPosted: Thu Sep 08, 2005 1:56 am 
Newbie

Joined: Mon Aug 08, 2005 2:02 am
Posts: 5
How can I insert sequntial long values into a non primary-key field using Hibernate?
Thanks

Hibernate version:
Hibernate 3.0.5
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2005 1:58 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Is there any reason why a database trigger can't be used?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2005 2:02 am 
Newbie

Joined: Mon Aug 08, 2005 2:02 am
Posts: 5
A database independent solution is prefered, if possible.


Top
 Profile  
 
 Post subject: Re: using sequence generator for non primary-key fields
PostPosted: Mon Sep 26, 2005 3:14 am 
Newbie

Joined: Wed Sep 14, 2005 9:28 am
Posts: 3
Hi ,
I have the same kind of requirement , if you have the answer coild you please let me know,

Thanks and Regards,
Ravisha


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 26, 2005 3:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
write a usertype.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: using sequence generator for non primary-key fields
PostPosted: Wed Sep 28, 2005 12:18 am 
Newbie

Joined: Mon Aug 08, 2005 2:02 am
Posts: 5
pashadd wrote:
How can I insert sequential long values into a non primary-key field using Hibernate?
Thanks

Hibernate version:
Hibernate 3.0.5
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


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