[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2861) cascade="delete-orphan, all" is ignored
Steve Ebersole (JIRA)
noreply at atlassian.com
Wed Oct 3 01:46:25 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-2861.
-------------------------------
Resolution: Fixed
3.2/trunk
> cascade="delete-orphan,all" is ignored
> --------------------------------------
>
> Key: HHH-2861
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2861
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.4.sp1
> Reporter: Rafael Chaves
> Priority: Trivial
>
> In HbmBinder.java, the following code has a bug in which it will ignore the "delete-orphan" value if it appears at position 0:
> private static void validateCascade(Element node, String path) {
> String cascade = node.attributeValue("cascade");
> if ( cascade!=null && cascade.indexOf("delete-orphan")>0 ) {
> throw new MappingException("single-valued associations do not support orphan delete: " + path);
> }
> }
> Instead, it should be:
> if ( cascade!=null && cascade.indexOf("delete-orphan")>=0 ) {
> As a result, the user will not be warned if "delete-orphan,all" was specified in the cascade attribute, which is meaningless.
--
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