andreasronge/neo4j — Issue #95: Assigning nil to a property with a default value should not reset the value
Author: dnagir
Created: 2011-12-14 22:54:47+00:00
State: open

http://neo4j.lighthouseapp.com/projects/15548/tickets/212-assigning-nil-to-a-property-with-a-default-value-should-not-reset-the-value

```ruby
class TestTypes < Neo4j::Model
property :age_with_default, :type => Fixnum, :default => 10
property :age_no_default, :type => Fixnum
end

t = TestTypes.new
t.age_with_default # 10
t.age_with_default = 123
t.age_with_default # 123
t.age_with_default = nil
t.age_with_default # 0!!!!!! Should be either 123 or 10, but not 0

t.age_no_default # 0!!!!! Should be nil
t.age_no_default = nil
t.age_no_default # 0!!!!! Should be nil
```