DragonByte Tech
Well-known member
I've recently discovered the
From the comment in the User entity, I understand that using cascadeDelete can be dangerous if there's a chance the deletion could be interrupted, which I assume would likely be due to preDelete validation checks that could fail. For entities where there's no such preDelete checks, is there a downside?
Fillip
cascadeDelete
feature of entities, but I couldn't help but notice that it's almost never used in the core XF2 entities. According to a quick search with phpStorm, it's only used in AbstractNode and WarningDefinition entities. If I was to guess, I'd say the cascadeDelete function was added later in the development process of XF2, and it was deemed not worth the bother to go back and change old entities to cascadeDelete when _postDelete
was already utilised?From the comment in the User entity, I understand that using cascadeDelete can be dangerous if there's a chance the deletion could be interrupted, which I assume would likely be due to preDelete validation checks that could fail. For entities where there's no such preDelete checks, is there a downside?
Fillip