Closed royipr closed 8 years ago
No, unfortunately there's no official support for this. However, if all you're doing is saving, and you're ok with getting your hands dirty (and a little bit of ugly code), this can work:
var db = require('seraph')();
var model = require('seraph-model');
var user = model(db, 'USER');
user.useTimestamps();
var txn = db.batch();
user.db = txn;
user.save({foo: 'bar'}, function(err, result) { console.log(result) });
user.save({foo2: 'bar2'}, function(err, result) { console.log(result) });
user.db = db;
txn.commit();
// shortly after, the callbacks to the two `save` calls are called.
Hi..
Is it possible to create multipal nodes with one request without skipping some of the model features?
for example
CREATE (n:USER {someData})-[r:Had]->(p:Computer {data})
I know that this is possible via seraph but if I usedb.query
it skips some of the model features likemodel.useTimestamp