[hibernate-issues] [Hibernate-JIRA] Created: (EJB-222) Add "remove" cascading style to CascadeStyle for XML mappings

Christian Bauer (JIRA) noreply at atlassian.com
Sun Sep 3 07:11:24 EDT 2006


Add "remove" cascading style to CascadeStyle for XML mappings
-------------------------------------------------------------

         Key: EJB-222
         URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-222
     Project: Hibernate Entity Manager
        Type: Improvement

  Components: EntityManager  
    Reporter: Christian Bauer


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