-->
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.  [ 7 posts ] 
Author Message
 Post subject: Not all INSERTS are inserted!?
PostPosted: Fri Apr 30, 2004 11:02 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
I'm using Hibernate 2.1.3 with Postgres 7.2.1.

I have a method rather big that inserts in several tables in one transaction.
As an example, it inserts:
Code:
1 in A
30 in B
120 in C



The method is executing correctly giving no error. The only problem that I'm having is that in "C" table, I only have 83 registers of the total 120!?
And if I remove the 120 in C code section, it inserts correctly in A and in B.

So what's the problem? Do I have to configure some boot parameter to insert that much of data?

Whats interesting is that the method doesn't become slow or anything. And I'm printing all the newly 120 created objects right before saving them.

Do I have to configure for bulk inserts?


Please help. I'm very stuck.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 11:09 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You have asked several hundred questions and, by now, you should know that "enable SQL log output" is the best way to solve that problem. I also recommend you read again that big red warning message before you post.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 11:15 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
christian wrote:
You have asked several hundred questions and, by now, you should know that "enable SQL log output" is the best way to solve that problem. I also recommend you read again that big red warning message before you post.


Thanks for the reply.
I've enabled the debug in my app and I'm showing the generated sql.
What's weird is that, Hibernate is processing all of my 120 objects. But in my DB, I only have 83 registers in C.


Any help please?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 11:16 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Stop begging for help and debug your database. We can't help you if you don't even tell us what database it is!

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 11:20 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
christian wrote:
Stop begging for help and debug your database. We can't help you if you don't even tell us what database it is!


First, I'm not begging for help. I'm simply asking for help like any other developer on this forum.
Second, if you look closely, you'll see that the DB I'm using is in my first post.

I've never had this problem that's why I'm asking for help to see if there's any parameter that I need to configure for bulk inserts.
Just that.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 11:21 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
So go to a postgres forum and tell them that you execute 100 INSERTs and only 80 get saved.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 11:26 am 
Pro
Pro

Joined: Wed Oct 08, 2003 10:31 am
Posts: 247
christian wrote:
So go to a postgres forum and tell them that you execute 100 INSERTs and only 80 get saved.


Thanks for the help.
By your answer I guess there's no parameter for bulk inserts.
That was my doubght. I'll see if this is a Postgres matter.


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