-->
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: how to disable generator when db trigger creates id
PostPosted: Thu May 12, 2011 9:48 am 
Newbie

Joined: Thu May 12, 2011 9:42 am
Posts: 3
Currently when I try to insert new records I am getting an error:

Code:
[ERROR] 05/12/11_09:44:20.54 [org.hibernate.event.def.AbstractFlushingEventListener] - Could not synchronize database state with session


I believe this is due to database triggers attempting to create the ID. The triggers need to remain in place to support legacy applications using the same database. How can I configure the hbm.xml to not generate the ID?


Top
 Profile  
 
 Post subject: Re: how to disable generator when db trigger creates id
PostPosted: Mon May 16, 2011 10:48 am 
Newbie

Joined: Thu May 12, 2011 9:42 am
Posts: 3
anyone?


Top
 Profile  
 
 Post subject: Re: how to disable generator when db trigger creates id
PostPosted: Mon May 16, 2011 3:18 pm 
Newbie

Joined: Thu May 12, 2011 9:42 am
Posts: 3
For future reference, I set the generator="native" and it seems to have resolved the issue.


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.