-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Make allowNull
default for DS.attr('boolean')
in 3.0
#4571
Comments
allowNull
default for DS.attr('boolean')
in Ember Data 3.0allowNull
default for DS.attr('boolean')
in 3.0
Booleans in DB context are often misused, with people expecting NULL and False to equate, etc. IMHO the |
I can understand the desire to have consistency around the default for Right now we don't have a good way to switch default other then logging a warning in the 2.x version then switching in 3.0. Some of the feedback from the 2.x release with changing the defaults for async relationships was painful since you couldn't effectively address the change until you were on the next major release (unlike a deprecated method where you could replace a deprecated method with the new api before bumping the major version). |
You could start logging in a 2.x version released at the same time as 3.0, that would present a clear path. Or simply skip logging and mention it as a breaking change in the 3.0 changelog. This is a small change, after all. Async relationships affected basically all models, where as this will affect a smaller amount of models. |
Sorry for letting this sit so long! I think in general, we want to be moving away from transforms conceptually (because they add complexity in general and could easily be replaced directly in the serializer itself). Again, sorry for the delays, but I don't think we are going to move this direction so I'm going to go ahead and close this issue... |
@pangratz made a great enhancement here: #4022
I would be happy with either of (1) removing the option (string and number transforms has no option) or (2) flip the default value of the option to
true
.This would make this transform consistent with string, number etc. where no option is required to allow null. Since it's a breaking change we must wait until 3.0.
The text was updated successfully, but these errors were encountered: