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: Creation Id and problem under Oracle
PostPosted: Wed Oct 20, 2004 6:42 am 
Beginner
Beginner

Joined: Mon Feb 09, 2004 6:43 am
Posts: 35
Hibernate version:
2.1.6

DB
Oracle 9i

I've insert many date using "save" methdod in Hibernate and it is done as prepared statement in Oracle. But I've notice that there are many

select hibernate_sequence.nextval from dual

in Oracle trace.

I've changed my "id" column in mapping to "assigned" :


<id
name="id"
column="EXCHANGE_RATE_ID"
type="long"
unsaved-value="0"
>
<generator class="assigned">
</generator>
</id>

and id is genereated by program because we use standalone application such solution is safe. But in Oracle trace I see that Hibernate still produce many (as many as batch size is):

select hibernate_sequence.nextval from dual

before inserting to my table. How to stop these id generation selects!?
It should not be generated for this table.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 20, 2004 7:05 am 
Beginner
Beginner

Joined: Mon Feb 09, 2004 6:43 am
Posts: 35
I would like to add that in our example inserts takes shorter then generation of the id !!


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.