Identity

Constants

Methods

#==

def ==(other)
  other.class == self.class && other.id == id
end

#eql?

def ==(other)
  other.class == self.class && other.id == id
end

#hash

def hash
  id.hash
end

#id

def id
  id = neo_id
  id.is_a?(Integer) ? id : nil
end

#neo_id

def neo_id
  _persisted_obj ? _persisted_obj.neo_id : nil
end
#to_key

Returns an Enumerable of all (primary) key attributes or nil if model.persisted? is false

def to_key
  _persisted_obj ? [id] : nil
end