orientdb - How to insert a vertex with link type property with the orientjs query builder? -
i trying insert vertex orientjs(previously oriento) query builder. class has link type property pointing class.
i know can work raw query string love use query builder.
here i've tried far :
db.insert() .into('vertexclassname') .set({"prop":"value", "linkproperty":"33:1289287"}) db.insert() .into('vertexclassname') .set({"prop":"value", "linkproperty":"#33:1289287"})
i following error :
error on saving record in cluster #13
am setting properties in right way ? error related somtehing else ? have sucessfully ran insert query in cluster #13 raw query string in studio...
according official documentation seems problem might @ end of statement
db.insert().into('vertexclassname') .set({"prop":"value", "linkproperty":"33:1289287"}).one() .then(function (data) { // callback });
check if code works adding one() pipe line
edited: found method in orientjs.
db.create('vertex', 'v') .set({ key: 'value', foo: 'bar' }) .one() .then(function (vertex) { console.log('created vertex', vertex); });
when using tinkerpop api recommend using createvertex instead of insert, because createvertex intended graphs , insert documents... try create() method instead?
Comments
Post a Comment