[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3167?page=c...
]
Gail Badner updated HHH-3167:
-----------------------------
Description:
Currently, when an entity in a collection mapped as a one-to-many on a join table is
deleted, it is not automatically removed from the collection. This causes
ConstraintViolationException to be thrown when the row is deleted from the entity table.
This is because the join table still refers to that row.
The fix should delete the rows in the join table that refer to the entity before the
entity iteslf is deleted.
ConstraintViolationException is not thrown when the one-to-many association is on a
foreign key, or when the one-to-many is bidirectional.
This may also happen with unidirectional many-to-many associations since they also use a
join table, but I have not check that scenario yet.
Summary: When an entity is deleted, remove it from unidirectional one-to-many
collection on join tables (was: When an entity is deleted, reemove it from unidirectional
one-to-many collection on join tables)
When an entity is deleted, remove it from unidirectional one-to-many
collection on join tables
----------------------------------------------------------------------------------------------
Key: HHH-3167
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3167
Project: Hibernate3
Issue Type: Sub-task
Reporter: Gail Badner
Assignee: Gail Badner
Currently, when an entity in a collection mapped as a one-to-many on a join table is
deleted, it is not automatically removed from the collection. This causes
ConstraintViolationException to be thrown when the row is deleted from the entity table.
This is because the join table still refers to that row.
The fix should delete the rows in the join table that refer to the entity before the
entity iteslf is deleted.
ConstraintViolationException is not thrown when the one-to-many association is on a
foreign key, or when the one-to-many is bidirectional.
This may also happen with unidirectional many-to-many associations since they also use a
join table, but I have not check that scenario yet.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira