Skip to content

Commit

Permalink
Add id field to properties, containing neo_node_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kleppmann committed Jun 16, 2009
1 parent a7d248a commit ab58220
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/neo4j/mixins/node.rb
Expand Up @@ -79,6 +79,7 @@ def init_without_node
# :api: public
def set_property(name, value)
$NEO_LOGGER.debug{"set property '#{name}'='#{value}'"}
return if name.to_s == 'id' # id is neo_node_id and cannot be changed

if value.nil?
remove_property(name)
Expand Down Expand Up @@ -223,7 +224,7 @@ def hash
#
# :api: public
def props
ret = {}
ret = {"id" => neo_node_id}
iter = @internal_node.getPropertyKeys.iterator
while (iter.hasNext) do
key = iter.next
Expand Down

0 comments on commit ab58220

Please sign in to comment.