UPDATE « Exception « JPA Q&A





1. update causing synchronize exception only with replication    forum.hibernate.org

We are having an issue with Hibernate and SQL Server replication (i.e synchronizes table data between 2 databases, 1 internal, 1 external). We have tested Hibernate with our application without errors when replication is not enabled on the Hibernate tables. In order for replication SQL Server adds a new column to the Hibernate tables called rowguid. We have tested adding a ...

2. one-to-many results in cannot update exception.    forum.hibernate.org

Author Message james.a.clinton@gmail.com Post subject: one-to-many results in cannot update exception. Posted: Mon Apr 30, 2007 4:51 am Newbie Joined: Fri Jan 05, 2007 6:44 am Posts: 12 Hello, I am having problems updating an entity with a one-to-many collection because hibernate thinks the fkey is null. Code: Hibernate: update INSTRUMENTGROUPINGS set INSTRUMENTGROUPID=null where INSTRUMENTGROUPID=? and UUID=? This problem ...

3. Hibernate Exception on update    forum.hibernate.org

Hi, I'm getting a hibernate exception when i try to update only 2 fields (which are composite primary key) of the table.... when i try to update any other field i don't get an exception. The exception i get is: org.hibernate.HibernateException: Unexpected row count: 0 expected: 1 at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32) at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:1982) at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(BasicEntityPersister.java:1909) at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:2149)

4. No error, no exception but still NO UPDATE    forum.hibernate.org

User dbuser=(User)session.load(User.class, tempuser.getPortaluserid()); dbuser=(User)session.merge(tempuser); session.update(dbuser); ...