Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Issue with Model_Soft and cascade delete
  • This exception is thrown when deleting an object which uses soft delete model and is related to other models which are not soft delete, even if cascade_delete is set to false.

    Orm\RelationNotSoft [ Error ]: Both sides of the relation must be subclasses of Model_Soft or Model_Temporal if cascade delete is true. Model_Lead was found instead.

    The relation :

    protected static $_has_many = array(
            'leads' => array(
                'key_from' => 'id',
                'model_to' => 'Model_Lead',
                'key_to' => 'user_id',
                'cascade_save' => false,
                'cascade_delete' => false,
            ),
        );

    I'm using FuelPHP 1.6.1.

    Thanks for your help :)
  • Please report this as an issue at https://github.com/fuel/orm/issues so it can be looked at.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion