Question

  1. When I try to execute $node->addLabels(array($label)) and batch is not committed yet I get an exception. So we cannot add label to node during batch at all? Or any workaround is possible?

  2. When I try to get ID of the new created node $node->getID() during batch I get null. ID is available only after the batch is committed. Any way to get ID before the commit?

Was it helpful?

Solution

1) Adding labels to an open batch is not supported by neo4jphp.

2) The node does not have an id until the batch is committed. There is no way to get the node id until the batch is committed. This is a limitation of the REST API.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top