Javascript 值未保存在orientdb类中

Javascript 值未保存在orientdb类中,javascript,node.js,orientdb,Javascript,Node.js,Orientdb,我试图将一个JS对象保存到orientdb类,但值本身并没有持久化。创造一个“记录” 我遵循这个例子: 节点版本:v0.10.26 orientdb版本:orientdb-community-1.7-rc1 var vertex = { '@class':'People', 'id':'123', 'name':'Giraldo' }; db.vertexCreate(vertex) .then(function(results){ console.log(r

我试图将一个JS对象保存到orientdb类,但值本身并没有持久化。创造一个“记录”

我遵循这个例子:

节点版本:v0.10.26

orientdb版本: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 a vertex:', error);
});
结果:

{ '@class': 'p',
  '@type': 'd',
  '@version': 1,
  '@rid': { clusterId: 13, clusterPosition: 48, recordId: '#13:19' } }
模式:

浏览到对象:

有人知道我做错了什么吗?

你需要做:

db.open()
     .then(function(){

         //your code goes here

     })
如果您已经实现了上述代码,但它仍然不起作用,那么我建议您使用
executeCommand()
。欲了解更多信息,请点击

我希望您已更新到最新版本