You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 2.0 we check the default attributes for a model to see if we should make the input field nullable or not. So if the field is not nullable itself, setting a default attribute on the model will make the create input for that field nullable. This works fine for simple cases but if the default attribute is dynamic you might want to do this on the observer. I think we should respect this as the constraint that the field is not nullable will probably be on the database in that case.
I’m thinking of something like nullableOnCreation() that can be called on a field in the model scheme to define this behavior. Thoughts @erikgaal?
The text was updated successfully, but these errors were encountered:
In 2.0 we check the default attributes for a model to see if we should make the input field nullable or not. So if the field is not nullable itself, setting a default attribute on the model will make the create input for that field nullable. This works fine for simple cases but if the default attribute is dynamic you might want to do this on the observer. I think we should respect this as the constraint that the field is not nullable will probably be on the database in that case.
I’m thinking of something like
nullableOnCreation()
that can be called on a field in the model scheme to define this behavior. Thoughts @erikgaal?The text was updated successfully, but these errors were encountered: