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.5] Where clauses should use original attribute values #23031

Merged
merged 2 commits into from
Feb 5, 2018

Conversation

mnishihan
Copy link
Contributor

With current implementation, it is impossible to update any of the foreign or related keys in Pivot instance, without executing raw SQL queries, as the generated query is using current attribute values instead of the original values. This PR will fix this issue.

With current implementation, it is impossible to update any of the foreign or related keys in Pivot instance, without executing raw SQL queries, as the generated query is using current attribute values instead of the original values. This commit will fix this issue.
This commit fixes failed test case, where a Pivot is directly instantiated using Mockery and delete is attempted.
@mnishihan
Copy link
Contributor Author

I don't know how to fix the failed test. I tried, but failed. :-(

Feel free to close this PR.

@taylorotwell
Copy link
Member

You had a typo in your code. I fixed it.

@taylorotwell taylorotwell merged commit 68ccd26 into laravel:5.5 Feb 5, 2018
@mnishihan
Copy link
Contributor Author

Silly copy-paste error in hastiness at dead of night. :-)

Thanks a lot @taylorotwell 👍

@meysammahfouzi
Copy link

Could you please provide a sample code of what becomes possible by this commit?

@GrahamCampbell GrahamCampbell changed the title Where clauses should use original attribute values [5.5] Where clauses should use original attribute values Feb 10, 2018
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