Class ForeignKeys.Nullifier

  • Enclosing class:
    ForeignKeys

    public static class ForeignKeys.Nullifier
    extends Object
    Delegate for handling nullifying ("null"ing-out) non-cascaded associations
    • Constructor Detail

      • Nullifier

        public Nullifier​(Object self,
                         boolean isDelete,
                         boolean isEarlyInsert,
                         SharedSessionContractImplementor session,
                         EntityPersister persister)
        Constructs a Nullifier
        Parameters:
        self - The entity
        isDelete - Are we in the middle of a delete action?
        isEarlyInsert - Is this an early insert (INSERT generated id strategy)?
        session - The session
        persister - The EntityPersister for self
    • Method Detail

      • nullifyTransientReferences

        public void nullifyTransientReferences​(Object[] values)
        Nullify all references to entities that have not yet been inserted in the database, where the foreign key points toward that entity.
        Parameters:
        values - The entity attribute values