Hi,
I just run to make the relationship between two nodes in python.
Run the raw cypher query with tx.
When I run the query in neo4j Desktop It works, But doesn't work in python code.
Well, it looks like work, but the database doesn't update.
Any comments would be appreciated. Thanks
poiName = poiProperty['poiName']
with self.driver.session(database="hpg01") as session:
tx = session.begin_transaction()
stmt = '''
MATCH (poi:Poi {poiName: "%s", poiId : %s})
MATCH (mbti:MBTI {name: "%s"})
MERGE (poi)-[:MBTI_IS]->(mbti)
RETURN (poi)-[:MBTI_IS]->(mbti)
'''%(poiName,int(poiId), mbti)
result = tx.run(stmt)
print("result: ", result.single()[0])
return result