You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When both a parent model and a related model have acts_as_paranoia, and I query the parent model with a join statement (e.g. ParentModel.joins(:related_models).where(related_models: { [come criteria] })), the constructed SQL query does contain "related_models".deleted_at IS NULL, and thus all destroyed related_models are taken into account in the query.
See pull request for test case.
The text was updated successfully, but these errors were encountered:
Hmmm... sorry... I don't do this a lot. Somehow the commit for this issue got mixed in the pull request for the other issue I reported. Here's the pull request: #110
This issue appears to have been related to a now resolved ActiveRecord issue. rails/rails#9296 - Encountered this today and learned that the fault did not lie with paranoia.
When both a parent model and a related model have acts_as_paranoia, and I query the parent model with a join statement (e.g. ParentModel.joins(:related_models).where(related_models: { [come criteria] })), the constructed SQL query does contain "related_models".deleted_at IS NULL, and thus all destroyed related_models are taken into account in the query.
See pull request for test case.
The text was updated successfully, but these errors were encountered: