[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2057?page=all ]
Emmanuel Bernard moved EJB-222 to HHH-2057:
-------------------------------------------
Project: Hibernate3 (was: Hibernate Entity Manager)
Key: HHH-2057 (was: EJB-222)
Component: core
(was: EntityManager)
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
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira