From 2dd23e143eadef25197ee9541ee42e9c6b22f624 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Tue, 28 Nov 2017 09:27:09 -0600 Subject: [PATCH] not all of them were intended to be pushed --- .../org/hibernate/engine/internal/Cascade.java | 4 ---- .../hibernate/engine/internal/ForeignKeys.java | 4 ---- .../hibernate/engine/internal/Nullability.java | 17 ----------------- 3 files changed, 25 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/Cascade.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/Cascade.java index 3e1d0ddd20..08a42c420d 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/Cascade.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/Cascade.java @@ -142,10 +142,6 @@ public final class Cascade { ); } else { - if ( action == CascadingActions.DELETE ) { - - } - if ( action.requiresNoCascadeChecking() ) { action.noCascade( eventSource, diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/ForeignKeys.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/ForeignKeys.java index fd90c95ba9..e98f9e7c7f 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/ForeignKeys.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/ForeignKeys.java @@ -14,7 +14,6 @@ import org.hibernate.TransientObjectException; import org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer; import org.hibernate.engine.spi.EntityEntry; import org.hibernate.engine.spi.SharedSessionContractImplementor; -import org.hibernate.engine.spi.Status; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.proxy.HibernateProxy; import org.hibernate.proxy.LazyInitializer; @@ -160,9 +159,6 @@ public final class ForeignKeys { if ( entityEntry == null ) { return isTransient( entityName, object, null, session ); } - else if ( isDelete && ( entityEntry.getStatus() == Status.DELETED || entityEntry.getStatus() == Status.GONE ) ) { - return false; - } else { return entityEntry.isNullifiable( isEarlyInsert, session ); } diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/Nullability.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/Nullability.java index 7fec9be63e..ad4b8cd767 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/Nullability.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/Nullability.java @@ -101,23 +101,6 @@ public final class Nullability { if ( checkability[i] && values[i]!= LazyPropertyInitializer.UNFETCHED_PROPERTY ) { final Object value = values[i]; if ( !nullability[i] && value == null ) { - - // generally speaking this is an exception as we will throw below - // but first, we check for a special condition in which: - // 1) we are processing a delete - // 2) the property represents the "other side" of this association - // 3) the other side is currently in the "being deleted" status - // 4) the property is defined to cascade deletes from the other side to - // this association property - // - // in such a case we allow this to continue - if ( checkType == NullabilityCheckType.DELETE ) { - if ( propertyTypes[i].isEntityType() ) { - final EntityType associationType = (EntityType) propertyTypes[i]; - - } - } - //check basic level one nullablilty throw new PropertyValueException( "not-null property references a null or transient value",