We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I am very new with neo4j and of course with neo4jphp, so i dont know if i am missing something.
When the batch mode is on and i create a node and after i add label, then throw an exception about the node is not saved
$batch = $this->neo4->startBatch(); $label = $this->neo4j->makeLabel(self::LABEL_USER); $partner = $this->neo4j->makeNode(); $partner ->setProperty('mongoId', (string) $origin->getId()) ->setProperty('slug', $origin->getSlug()) ->setProperty('name', $origin->getName()) ->save(); $node->addLabels([$label]); $batch->commit();
How i can create a node and add a label in batch mode? Is this possible?
Regards and thanks
The text was updated successfully, but these errors were encountered:
Hello I have the same problem, someone can help or explain another way to do this.
Regards
Sorry, something went wrong.
I made a PR but i not accepted because in under way another implementation.
#95
I think that i found some solution... @ Everyman\Neo4j\Command\SetLabels on __constructor
$nodeId = $node->getId(); if (!$nodeId) { throw new \InvalidArgumentException("Cannot set labels on an unsaved node"); }
to
$nodeId = $node->getId(); if (!$nodeId) { if($nodeId != 0) { throw new \InvalidArgumentException("Cannot set labels on an unsaved node"); } }
Some times the $node is equles to 0 and it comfusing between false and Node#0
No branches or pull requests
Hi,
I am very new with neo4j and of course with neo4jphp, so i dont know if i am missing something.
When the batch mode is on and i create a node and after i add label, then throw an exception about the node is not saved
How i can create a node and add a label in batch mode? Is this possible?
Regards and thanks
The text was updated successfully, but these errors were encountered: