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] Ensure MYSQL JSON keys are in double quotes on updating JSON columns. #22118

Merged
merged 1 commit into from
Nov 17, 2017

Conversation

lucidlogic
Copy link
Contributor

@lucidlogic lucidlogic commented Nov 17, 2017

  • Currently, if your MYSQL JSON keys have a dash, the update fails due to this issue https://bugs.mysql.com/bug.php?id=81896
  • this change ensures the keys are within double quotes
  • before: "$.foo-bar"
  • after: '$."foo-bar"'
  • I changed the tests to reflect the new format

@lucidlogic lucidlogic force-pushed the 5.5 branch 8 times, most recently from f5d6b37 to 4df476d Compare November 17, 2017 16:34
- Currently if your JSON keys have a dash, the update fails due to this issue https://bugs.mysql.com/bug.php?id=81896
- this change ensures the keys are within double quotes
- before: “$.foo-bar”
- after: '$."foo-bar"'
- I changed the test to reflect the new format
@lucidlogic lucidlogic changed the title Ensure JSON keys are in double quotes on updating JSON columns. [5.5] Ensure JSON keys are in double quotes on updating JSON columns. Nov 17, 2017
@lucidlogic lucidlogic changed the title [5.5] Ensure JSON keys are in double quotes on updating JSON columns. [5.5] Ensure MYSQL JSON keys are in double quotes on updating JSON columns. Nov 17, 2017
@taylorotwell taylorotwell merged commit d749493 into laravel:5.5 Nov 17, 2017
@taylorotwell
Copy link
Member

Can you review this and make sure it also looks OK to you?

@themsaid
Copy link
Member

@taylorotwell just checked and it looks good to me, we did the same change for when querying a a JSON column. where('name->first-name', 'mohamed')

taylorotwell pushed a commit that referenced this pull request Nov 30, 2017
* Fixes MySqlGrammar json accessor building when having a json field with nested columns. Related to #22118

* adds testMySqlUpdateWrappingNestedJson

* fix style
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