[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1917) Bulk Delete on the owning side of a ManyToMany relation needs to delete corresponding rows from the JoinTable

Eugen Paraschiv (JIRA) noreply at atlassian.com
Thu Mar 1 12:50:49 EST 2012


    [ https://hibernate.onjira.com/browse/HHH-1917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45776#comment-45776 ] 

Eugen Paraschiv commented on HHH-1917:
--------------------------------------

Is this triggered by the same bug?: 
https://groups.google.com/d/topic/h2-database/qOX1wHVBDJ4/discussion
The problem applies to h2 but not to mysql.
Thanks. 
Eugen. 

> Bulk Delete on the owning side of a ManyToMany relation needs to delete corresponding rows from the JoinTable
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-1917
>                 URL: https://hibernate.onjira.com/browse/HHH-1917
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.0.cr2
>         Environment: Hibernate 3.2 cr2
> Hibernate Annotations 3.2.0.CR1 
> Hibernate Entity Manager 3.2.0.CR1 
> Oracle 10.1, with Oracle 10.2 JDBC Driver
>            Reporter: Keenan Ross
>
> Emmanuel says in http://forum.hibernate.org/viewtopic.php?t=961140,
>  [quote]I also know we need to fix some limitations regarding associations table updates / delete and bulk operations[/quote]
> This issue provides a reminder that this task is pending.
> For bulk deletes, consider this scenario: Assume Person and Group entities in a bidirectional ManyToMany relationship with Group as the owning side. This implies a Join table, with the default name of Group_Person. Currently issuing
> em.createQuery("delete from Group").executeUpdate();
> makes no attempt to delete the corresponding rows from Group_Person, even though Group is the owning side, giving constraint errors. Since Group_Person has no corresponding entity, I don't think the spec's prohibition on lifecycle operations or cascading applies here. The only workarround is to individually delete the Groups.
> --keenan

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list