-->
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: identity primary key with class="native"
PostPosted: Mon Dec 26, 2005 2:45 am 
Newbie

Joined: Mon Dec 26, 2005 2:36 am
Posts: 1
I encountered the problem with table contains identity primary key field.

When I call session.save(obj), the hibernate inserted this record into table without waiting for transaction commit althought the program called session.beginTransaction() function.

Please show me how to solve this problem.

Best regards,


Top
 Profile  
 
 Post subject: rdbms level
PostPosted: Tue Dec 27, 2005 5:07 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
If you are worrying about insert sql statement being issued to the database, then stop: RDBMS will discard the insert if transaction will be rolled back.
Note: db connection should not be in the autocommit mode and the RDBMS is supposed to support transactions (for example MySQL does not support them without innodb)

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


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.