Cleanup data before saving in neoj4
This commit is contained in:
parent
975b148d54
commit
5285677876
|
@ -31,7 +31,7 @@ Neo4j.prototype.node = function find(id, callback) {
|
|||
|
||||
Neo4j.prototype.create = function create(model, data, callback) {
|
||||
data.nodeType = model;
|
||||
var node = this.client.createNode(data);
|
||||
var node = this.client.createNode(cleanup(data));
|
||||
node.save(function (err) {
|
||||
if (err) {
|
||||
return callback && callback(err);
|
||||
|
|
Loading…
Reference in New Issue