Open DIDoS opened 8 years ago
Hi,
I do use Containable a lot, and although I haven't experienced that issue myself, I can imagine how it would happen. If you've got a fix I'd certainly be interested in a PR.
Thanks.
Hey burriko, I can't see how your Behaviour should be able to handle this.. The beforeFind doesn't seem to be executed since the contained Model has the Softdelete Behaviour and the "parent" does not. It seems like the CakePHP Containable does not execute the beforeFind of the contained Model (and therefore its Behaviour). When adding the Behaviour to the "parent" Model a fatal is thrown in SoftDeletableBehavior:45 since $find_condition is null.
How should/did that work with your Containables?
When using the containable behaviour in a Model that includes a Model using the soft delete Behaviour the soft deleted Items are visible.
I would appreciate a discussion so I can create a pull request.