Hi, I'm having a similar issue caused by SQL Server merge replication. My application works perfectly until I configure the replication. As soon as I reload the app Hibernate throws the following error:
Code:
23-Nov-2004 18:08:05 net.sf.hibernate.impl.SessionImpl execute
SEVERE: Could not synchronize database state with session
net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)
When setting up merge replication on my database it highlights two issues:
1. Uniqueidentifier columns will be added to tables.
2. IDENTITY columns require the NOT FOR REPLICATION option.
It can't be the addition of the extra guid column that's causing the problem, as I've tested adding such a column manually with no issues. As the previous posts correctly state: if you don't tell Hibernate about any extra columns then it will happily ignore them.
The second point is just a recommendation and doesn't seem to affect my tables in any way.
Has anyone had an experience with setting up merge replication and Hibernate? Does Hibernate need to be configured in a particular way to deal with the changes that merge replication causes to the database?
Thanks,
Tim