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
json_array columns should return null for null values #655
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DBAL-966 We use Jira to track the state of pull requests and the versions they got |
Can't accept this bc break in 2.x, sorry. |
That sucks, since it was marked as resolved in 2.3.3... What's the workaround then, a custom data type? |
@wildlyinaccurate yep, for now, that's the solution :-\ |
@wildlyinaccurate it is marked as resolved in 2.3.3 indeed but if you have a look at |
Could we maybe get an additional "json" or "json_object" type? "json_array" is a poor name to begin with, as we can store non-array data as well. You can store a boolean, integer, float, or string just fine in a json_array column. The only problem is that when this type was added, the assumption was made that people would only use this to store arrays. I have a config-based table where the value column should be json, yet I can't use json_array because of this null bug. I guess I'm off to figure out my first custom type. |
I'd suggest the same as well: if we introduce a new json type now, then it's just going to be even more messy |
For the next person to come here looking for answers, I've posted a blog entry with the custom Json data type. |
I guess this is a BC-break, but it fixes DBAL-446.