Skip to content

[5.8] Fix updateOrInsert method for query builder#27906

Merged
taylorotwell merged 2 commits into
laravel:5.8from
Organizm238:fix-update-or-insert-method-for-query-builder
Mar 18, 2019
Merged

[5.8] Fix updateOrInsert method for query builder#27906
taylorotwell merged 2 commits into
laravel:5.8from
Organizm238:fix-update-or-insert-method-for-query-builder

Conversation

@Organizm238

Copy link
Copy Markdown
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