Why does batch.set_labels() work with batch.create() but not with batch.get_or_create_indexed_node()
This works, a node is created as expected.
batch = neo4j.WriteBatch(neo4j_graph)
a = batch.create(node({'name': 'a'}))
batch.set_labels(a, 'Person')
batch.submit()
This does not work, no node is created.
graph_db.get_or_create_index(neo4j.Node, 'node_index')
batch = neo4j.WriteBatch(neo4j_graph)
b = batch.get_or_create_indexed_node(NEO4J_NODE_INDEX, 'name',
'b',
{'name': 'b'}
)
batch.set_labels(b, 'Person')
batch.submit()