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.8] Fix updateOrInsert method for query builder #27906

Conversation

Organizm238
Copy link
Contributor

Fixes #27890

Now updateOrInsert meethod correctly works with empty values array.
Before it created syntactically wrong update SQL, now it doesn't trigger any update Query and simply returns 'true'.

I have also added the test cehcking the new behaviour of method.

Now it correctly works with empty values array.
Before it created syntactically wrong SQL, now it simply returns 'true'.
Now it checks for `update` method not being called,
if updateOrInsert update values array is empty.
@Organizm238 Organizm238 changed the title Fix update or insert method for query builder Fix updateOrInsert method for query builder Mar 17, 2019
@GrahamCampbell GrahamCampbell changed the title Fix updateOrInsert method for query builder [5.8] Fix updateOrInsert method for query builder Mar 18, 2019
@taylorotwell taylorotwell merged commit c04835e into laravel:5.8 Mar 18, 2019
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.

2 participants