Hi
I am getting the following exception while working with one-to-many relationship.
12:08:37,597 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
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:1952
)
at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(BasicEntityPersister.j
ava:1880)
at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:2120
Can anybody throw some pointers.
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: