Hello,

I'm just starting with oriento, and I'm building a tree of "pmobject"s.  My 
original
implementation uses edges to link between the nodes with the following code:

db.let("pmo", function(s){
  s.create("VERTEX","pmobject").set(pmObj);
}).let("child", function(s){
  s.create("EDGE","PM_child").from(id).to("$pmo")
}).return('$pmo').commit().one().then(function(data, err) {
  if (err) {res.send({success: false, msg: err});}
  else {res.send({success: true, id: data['@rid']})}
})

where "id" is the @rid of the parent node.

I was thinking of changing this to connecting the parent to child node with a 
"children"
linkset, and the child to parent node with a "parent" link.  I assume that this 
would
be faster to traverse and take up less disk resources as the tree scales.  The 
problem
is that I am unable to successfully replace the edge creation with the update 
statement
to add the child's @rid ($pmo) to the children linkset.  I've tried to 
restructure things
several different ways but always end up with a statement error from orientdb.

An example of working code that someone has done would make my day.

Gary

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to