Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Fix using onlyTrashed and withTrashed with whereHas #2 #13396

Merged
merged 1 commit into from
May 2, 2016
Merged

[5.2] Fix using onlyTrashed and withTrashed with whereHas #2 #13396

merged 1 commit into from
May 2, 2016

Conversation

acasar
Copy link
Contributor

@acasar acasar commented May 1, 2016

This is my attempt to fix #13390

What I did is:

  • First we need to store an array of global scopes that were removed from the query
  • If any scopes were removed from the hasQuery, we also need to remove them from the relationQuery.

@taylorotwell @themsaid

@themsaid
Copy link
Member

themsaid commented May 1, 2016

The same issue was reported in 5.1 here #13198

@acasar
Copy link
Contributor Author

acasar commented May 1, 2016

Yeah, in 5.1 global scopes are quite complicated, so there is no easy way to backport these changes. An entirely different fix would need to be made for 5.1.

There is also this one, which is also not working correctly in 5.1: #11456 (comment)

I'm not even sure if this can be fixed in 5.1... If I have some more time next week I'll look into it, but maybe the only option will be to suggest some official workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants