Please sign in to comment.
Remove a few custom Types' defaults to re-enable standard nil "defaul…
…t value" behavior DataMapper explicitly disallows :default => nil in class property declarations. When a DataMapper custom Type declares a non-nil default, there is no way to get nil property values "by default" upon object creation - they have to be set explicitly every time. This flies against long-standard DB and DM convention, where declared fields are nullable by default unless explicitly specified otherwise (SQL: NOT NULL, DM: :required => true). This is also true of the Salesforce object model. If default values are desired, they should be expressed via class property declarations, not underlying Type. Maybe validation behavior should be considered separately?
- Loading branch information...
Showing with 0 additions and 3 deletions.