src/Valkyrja/ORM/NativeEntityManager.php
public function remove(Entity $entity): bool
    {
        // Get the id of the object
        $id = spl_object_id($entity);

        // If the model is set to be created
        if (isset($this->createModels[$id])) {
            // Unset it
            unset($this->createModels[$id]);

            return true;
        }

        // If the model is set to be saved
        if (isset($this->saveModels[$id])) {
            // Unset it
            unset($this->saveModels[$id]);

            return true;
        }

        // The model wasn't set for creation or saving
        return false;
    }
public function remove(Entity $entity): bool
    {
        // Get the id of the object
        $id = spl_object_id($entity);

        // If the model is set to be created
        if (isset($this->createModels[$id])) {
            // Unset it
            unset($this->createModels[$id]);

            return true;
        }

        // If the model is set to be saved
        if (isset($this->saveModels[$id])) {
            // Unset it
            unset($this->saveModels[$id]);

            return true;
        }

        // The model wasn't set for creation or saving
        return false;
    }
Remove a model previously set for creation or save.

@param \Valkyrja\ORM\Entity $entity The entity instance to remove.

@return bool