Samuel Körner
Samuel Körner

Reputation: 3

py2neo update node in graph

i started using the py2neo database system with django.
How can i update a node in the graph database ?

I created a node:

   user = graph_db.get_or_create_indexed_node("users_email_single", email, email,
        {"user_id":user_id, 
         "basic_name_firstname": firstname,
         "basic_name_lastname": lastname,
         "contactprivate_email": email,
        })

I get the node with following code:

graph_db = neo4j.GraphDatabaseService("http://localhost:7474/db/data/")
user = graph_db.get_indexed_node("users_user_id", user_id, user_id)

Regards

Upvotes: 0

Views: 1677

Answers (1)

Nigel Small
Nigel Small

Reputation: 4495

You can also set individual properties outside a batch as follows:

user["name"] = "Bob"
user["age"] = 77

Upvotes: 2

Related Questions