#212 new
Dmytrii Nagirniak

Assigning nil to a property with a default value should not reset the value

Reported by Dmytrii Nagirniak | December 12th, 2011 @ 05:38 AM

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

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

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Neo4j.rb is a graph database framework for JRuby.

It provides:

* Mapping of ruby objects to nodes in networks rather than in tables.
* Storage of ruby object to a file system.
* Fast traversal of relationships between nodes in a hugh node space.
* Transaction with rollbacks support.
* Indexing and quering of ruby objects.
* Integration with Rails

People watching this ticket