0
我想創建新節點,但是當我在下一行添加額外的屬性時失敗。 對於如:neo4jrestclient,創建節點後添加屬性
gdb = GraphDatabase("http://localhost:7474/db/data/")
index = gdb.nodes.indexes.create('blogger')
for i in b:
uid = gdb.nodes.create(user_id=x,gender=i[0],profile_views=i[1],industry=i[2],occupation=i[3],email=i[4],locality=i[5],country=i[6],region=i[7])
# till here it adds all the properties as mentioned
# following 2 lines of code fails
uid.setProperty('hosts',<value>)
uid.relationships.create("follows",<value>)
還有一個查詢:我們怎樣才能到另一個節點
對EG的屬性節點的屬性之間添加關係:在上面的關係我想創建主機之間的關係這是唯一的每個節點
我有一種感覺,你必須先提交創建查詢。至少在其他框架中有一行代碼,如'gdb.finish();'或類似的代碼 – ulkas 2013-03-20 07:35:05
它是如何失敗的? – 2013-03-20 13:03:13