I am playing little bit with cayley database and I run to some problems. I am using last version 0.4, with nodejs, npm package (https://www.npmjs.org/package/cayley), mongoDB and angular.
Anyway first problem is that I cannot visualize any nodes. I am getting error "Uncaught The node must have a string id.". When I run g.V().All() I get:
{
"result": [
{
"id": "alice"
},
{
"id": "bob"
},
{
"id": "follows"
},
{
"id": "John"
},
{
"id": "Subject Node"
},
{
"id": "Object Node"
},
{
"id": "Predicate Node"
}
]
}
As I see it all my nodes has string ID, maybe I am missing something.
Second problem is deleting nodes or quads. As I mention I am using npm package and also the example from bottom
client.delete([{
subject: "Subject Node",
predicate: "Predicate Node",
object: "Object Node"
}], function(err, body, res) {
});
When I run it I get successful message that I have deleted 1 tripple but nodes are still there. Also quad. One thing I noticed is that in quads appeared this:
"Deleted" : [
NumberLong(9)
]
EDIT 1:
I sucessfully visualized data:
<moving> <name> "Moving" .
<moving> <description> "Basic object action." .
<moving> <parent> <walking> .
<moving> <parent> <running> .
<walking> <name> "Walking" .
<walking> <description> "Slow moving." .
<running> <name> "Running" .
<running> <description> "Fast moving." .
by running this:
moving = g.M("moving")
g.V().As("source").Follow(moving).Out("parent").Out("name").As("target").All()