javascript - Values not saving in orientdb class -
i'm trying save js object orientdb class, values aren't persisting. "record" created tough.
i'm following example: https://github.com/nitrog7/node-orientdb/wiki/graph-database#wiki-create-a-new-vertex
node version: v0.10.26
orientdb version: orientdb-community-1.7-rc1
var vertex = { '@class':'people', 'id':'123', 'name':'giraldo' }; db.vertexcreate(vertex) .then(function(results){ console.log(results); }) .error(function(error){ console.log('error creating vertex:', error); });
result:
{ '@class': 'p', '@type': 'd', '@version': 1, '@rid': { clusterid: 13, clusterposition: 48, recordid: '#13:19' } }
schema:
browse object:
anyone knows i'm doing wrong?
you need do:
db.open() .then(function(){ //your code goes here })
if have implemented above code , still not working, suggest go executecommand()
. more info on this, go here.
i hope have updated latest version.
Comments
Post a Comment