Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Cascade delete fails when extending Orm\Model_Soft
  • Hi everyone! I've been developing CodeIgniter apps for some time, and now I'm trying to migrate to FuelPHP. I really like it, even though I have to re-learn and re-think almost everything, but it's being fun :)

    I'm getting a "Orm\FrozenObject [ Error ]: No changes allowed." error when trying to cascade delete a model that extends Orm\Model_Soft. I have 'Categories' which has many 'Products' which belong to 'Categories'. When I execute delete(true) on a Category, the record is correctly soft-deleted and its deleted_at field gets filled with a unix timestamp. But then I get that error and no Products get deleted. If I extend Orm\Model instead of Model_Soft, the cascade delete works perfectly.

    Is there anything else I have to do to make cascade delete work with soft delete models?

    Thanks in advance!
  • HarroHarro
    Accepted Answer
    Not sure if that is support (yet).

    Best thing to do is to create an issue for it at https://github.com/fuel/orm/issues, and ping @uru, who created soft deletion.
  • Thanks Harro! The issue is now created.

Howdy, Stranger!

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

In this Discussion