]
Diego Pires Plentz resolved HHH-1018.
-------------------------------------
Assignee: Diego Pires Plentz
Resolution: Duplicate
Duplicate insert in join table when calling session.flush() twice
-----------------------------------------------------------------
Key: HHH-1018
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1018
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.1 beta 2
Environment: MySQL 5.0.13, Hibernate 3.1 beta 3, jdk 1.5.0_05, ant 1.6.2
Reporter: Connor Barry
Assignee: Diego Pires Plentz
Attachments: HibernateJIRA.zip
see
http://forums.hibernate.org/viewtopic.php?t=948463&sid=a1a88b56a4e306...
My problem is that when I run the above code, I call flush() twice. The second time I
call flush(), it correctly generates an update() statement, but also tries to insert a
second identical row in the join table activity_deals, which fails due to a non-unique-key
problem.
Why is Hibernate trying to insert the row twice? I've verified that after the first
flush(), Activity and Deal are both persistent and have both been inserted into their
respective tables, and join table.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: