Author: steve.ebersole(a)jboss.com
Date: 2007-10-03 01:44:41 -0400 (Wed, 03 Oct 2007)
New Revision: 14055
Modified:
core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java
Log:
HHH-2861 : validation of delete-orphan for to-one association cascading
Modified: core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java 2007-10-03 05:44:20 UTC
(rev 14054)
+++ core/trunk/core/src/main/java/org/hibernate/cfg/HbmBinder.java 2007-10-03 05:44:41 UTC
(rev 14055)
@@ -1566,9 +1566,9 @@
}
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);
+ 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 );
}
}
Show replies by date