brikteknologier / seraph

A thin and familiar layer between node and neo4j's REST api.
MIT License
309 stars 59 forks source link

Relate and label don't work in batch mode in case of updating existing node #178

Open ohord opened 9 years ago

ohord commented 9 years ago

This works fine:

    var someId = 1;
    var userJson = {some:"user"};
    var txn = db.batch();
    var user = txn.save(userJson);
    user.label("User");
    txn.relate(user,'has',someId);
    txn.commit(function(){})

this also works fine:

    var someId = 1;
    var userJson = {some:"user",id:2};  // Existing id in the database
    var txn = db.batch();
    var user = txn.save(userJson);
    txn.commit(function(){})

but this doesn't work:

    var someId = 1;
    var userJson = {some:"user",id:2}; 
    var txn = db.batch();
    var user = txn.save(userJson);
    user.label("User");
    txn.relate(user,'has',someId);
    txn.commit(function(){})

Error is following: Illegal character in path at index 2: ./{2}/labels

spencerkohan commented 8 years ago

I'm running into the same issue