-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate.show_sql=true does not show each insert statement
PostPosted: Wed Mar 02, 2005 1:41 pm 
Newbie

Joined: Wed Mar 02, 2005 1:15 pm
Posts: 4
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 2.1.1


Name and version of the database you are using:Oracle 8

The generated SQL (show_sql=true):


When i turn the show_sql=true..this is what happens.

I have an Object that has two sets of objects(both one to many from the first object). All the objects use sequences. When i save the first object after constructing the object graph(populating the sets) the sql that gets displayed is for each sequence generation call i get a select displayed. But when the insert happens it just shows one insert for each of the three objects. Whereas in the DB it has the complete dat i.e., all the elements in the sets end up in the DB. Is this how hibernate displays insert statements under the show_sql option?


Any help is apprecited.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 2:13 pm 
Regular
Regular

Joined: Thu Dec 18, 2003 2:14 am
Posts: 103
Location: Brooklyn, NY
What are your batch settings? Perhaps it is doing a batch insert (which is likely the behavior you would want), and thus only shows the insert for each batch.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 4:27 pm 
Newbie

Joined: Wed Mar 02, 2005 1:15 pm
Posts: 4
## set the maximum JDBC 2 batch size (a nonzero value enables batching)

hibernate.jdbc.batch_size 0


this is the only place in the hibernate.properties the word that <b>batch </b>appears


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 4:45 pm 
Regular
Regular

Joined: Thu Dec 18, 2003 2:14 am
Posts: 103
Location: Brooklyn, NY
Well then, I don't know. You need to give us more info, like it says in the submission form. That said, this is not likely a problem, if it is otherwise functioning properly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.