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: enter image description here

browse object: enter image description here

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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -