Closed rudaoshi closed 10 years ago
That happens because transactions for Cypher queries are handled differently that transactions for the rest of the API: for Cypher neo4jrestclient
uses the Transactional REST endpoint; nodes[0].relationships.all()
is using Batch endpoint. Mixing both in the same transaction block is not yet supported.
There are other issues when gb.query
saves transaction in global variable. Even if the transaction is finishead after query call, it prevents gb.node
call to succeed. It tries to use the stored QueryTransaction and ends with non-informative exception when tx.append
is called but has different signature. See http://stackoverflow.com/questions/24064307/typeerror-neo4jrestclient-append-got-an-unexpected-keyword-argument-data. At least a more informative exception should be raised.
Another thing is that after gb.query("")
which raises syntax error, all the following query calls end with the same syntax error because of the stored transaction.
I see. I will take a look to see how come up with a proper fix.
ex:
nodes = gb.query('...')
nodes[0].relationships.all() # returns None