Skip to content
New issue

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

rel.update(relation, key, value, callback) breaks when value is 0 #182

Open
deestan opened this issue Oct 2, 2015 · 1 comment
Open

Comments

@deestan
Copy link
Member

deestan commented Oct 2, 2015

To update the "position" property of relation#14 to 0, I would write the following:

db.rel.update({id: 14}, "position", 0, console.log);

This results in an error from Neo4j, saying that "{}" is an invalid value for property "position".

@deestan
Copy link
Member Author

deestan commented Oct 2, 2015

Current workaround:

db.rel.read(14, function(err, rel) {
  if (err) return callback(err);
  rel.position = 0;
  db.rel.update(rel, callback);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant