[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2057) Add "remove" cascading style to CascadeStyle for XML mappings

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Sep 6 12:32:24 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2057?page=comments#action_24337 ] 

Steve Ebersole commented on HHH-2057:
-------------------------------------

Note, especially since this could be handled in the annotations themselves...

> Add "remove" cascading style to CascadeStyle for XML mappings
> -------------------------------------------------------------
>
>          Key: HHH-2057
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2057
>      Project: Hibernate3
>         Type: Improvement

>   Components: core
>     Reporter: Christian Bauer
>     Assignee: Steve Ebersole
>     Priority: Blocker
>      Fix For: 3.2.1

>
>
> Currently the AnnotationBinder translates a JPA CascadeType.REMOVE as follows:
> case REMOVE:
>   cascade.append( "," ).append( "delete" );
> However, if I use XML mapping files I have to use cascade="delete" to get the same effect. A practical example why this is very inconvenient for users, documentation, etc: I want to translate the following annotation mapping to XML:
> @OneToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE})
> I end up with:
> <set name="foo" cascade="persist, merge, delete">
> I recommend adding "remove" as an alias for "delete" to the map in engine/CascadeStyle.java

-- 
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.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list