Issue #138 Fixing SoftDeleteBehavior belongsTo when import users on fixture#139
Issue #138 Fixing SoftDeleteBehavior belongsTo when import users on fixture#139CakeDC merged 2 commits intoCakeDC:developfrom
Conversation
Issue #138 Fixing SoftDeleteBehavior belongsTo when import users on fixture
|
Unfortunately this only covers 50 % of the cases, cause it does not attribute to belongsTo associations with aliases named differenlty than the model class. I updated my repo to showcase the problem. The repo with your fix, which solves the problem in the repo: But it didn't work for me in my actual code, cause it uses differently named aliases, like so: With this, the model can't be found cause it searches a model named like the alias. I fixed it with this: I wonder, though, if CakePHP provides a function to load such an association, so the fix doesn't need to do that "by hand". |
Fixing SoftDeleteBehavior belongsTo when import users on fixture