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
Describe the bug
Is there a way to hydrate model that includes null fields? Because if I load the model from DB, all fields that are null are not included in Model.attributes
Even Model.all_attributes() doesn't give me all attributes hydrated with None values.
To Reproduce
result=Model.create(field=value)
result.__attributes__# nullable field with NULL values will not appear in dict
Theres really not a great way to do this with consistency. The problem is if you don't supply the fields, we don't know what the defaults will be. Not every field you don't specify will be nullable. Some fields could default to any value you specify in the migration or table.
Describe the bug
Is there a way to hydrate model that includes null fields? Because if I load the model from DB, all fields that are null are not included in Model.attributes
Even Model.all_attributes() doesn't give me all attributes hydrated with None values.
To Reproduce
Expected behavior
The text was updated successfully, but these errors were encountered: