-->
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.  [ 1 post ] 
Author Message
 Post subject: Can use JDBC3 generated keys with Oracle sequences?
PostPosted: Fri Oct 22, 2004 10:44 am 
Newbie

Joined: Fri Oct 22, 2004 10:31 am
Posts: 1
Currently Hibernate generates 2 statements for each insert. The first statement selects the next value from the Oracle sequence. The second statement is the insert.
With the new JDBC3 feature of getting the returned keys it should be possible to reduce the insert to a single database roundtrip.
Can Hibernate generate a statement like
INSERT INTO table VALUES (sequence.NEXTVAL, ...)
and use the value generated by Oracle?

I tried already to set use_get_generated_keys to true, but this works only for the identity generator.

BTW, I could not find this issue in the forum.

Greetings,
Robert
----
Hibernate version: 2.6.2
Database: Oracle 9


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.