brikteknologier/seraph

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

helgeholm opened this issue · 1 comments

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".

Current workaround:

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