-->
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.  [ 3 posts ] 
Author Message
 Post subject: Problem when loading db with Insert statements.
PostPosted: Wed Aug 10, 2005 9:32 pm 
Newbie

Joined: Wed Aug 10, 2005 9:23 pm
Posts: 1
Dear Hibernate experts,

I am on a project near its deadline and I am having an unusual problem with hibernate. Let me describe it as simply as possible. We have two manners of loading our database (Oracle 9i)

1) An automated process which pulls data off of XML, fills it into objects, and then saves those objects with a Session interface. Using this method, our webservice can then operate without any problem.

2) A large file full of insert statements loads up the database. (This is a customer requirement.) Then, our web service can view everything okay, but has nothing but trouble updating data. We get numerous constraint errors, and at strange times. The same operation will throw a constraint error, and then work correctly on a second attempt.

(Oh, and we aren't doing simple deletions, but are rather marking rows as deleted, and then creating new ones.)

Has anybody heard of problems regarding filling databases with insert statements vs. Hibernate?

I am away from the office, or I would provide you with the standard information (SQL statements, etc.)

Thank you for any help.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 2:07 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
Do you activate second level cache in hibernate. To do that, you must always use hibernate to modify the database. If you activate second level cache and do insert statement out of hibernate, then hibernate cache may not be synchronized with your database

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject: sounds like a recipe for trouble
PostPosted: Thu Aug 11, 2005 1:05 pm 
Newbie

Joined: Mon Mar 21, 2005 12:52 pm
Posts: 11
Location: Chicago, Il
Are the insert statements going directly into the database? If so, your problem might be solved by letting the hibernate application read the insert file and perform the insert query. It sounds like the sequence generator is getting it from both ends, and I'll let your imagination draw out THAT picture.

_________________
where's my coffee mug?


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