lib/graphObject.js
function GraphObject(obj, fields) {
  this.isNew = true;
  this.errors = undefined;
  this._saveError = undefined;
  this._validationError = undefined;
  // this._adhocPaths = undefined;
  // this._removing = undefined;
  // this._inserting = undefined;
  // this.__version = undefined;
  this.__getters = {};
  // this.__id = undefined;
  // the type of container - node or relationship

  this._activePaths = new ActiveRoster();

  var required = this.schema.requiredPaths();
  for (var i = 0; i < required.length; ++i) {
    this._activePaths.require(required[i]);
  }

  this._doc = this._buildDoc(obj, fields);
  if (obj) this.set(obj, undefined, true);
  this._registerHooks();
}
function GraphObject(obj, fields) {
  this.isNew = true;
  this.errors = undefined;
  this._saveError = undefined;
  this._validationError = undefined;
  // this._adhocPaths = undefined;
  // this._removing = undefined;
  // this._inserting = undefined;
  // this.__version = undefined;
  this.__getters = {};
  // this.__id = undefined;
  // the type of container - node or relationship

  this._activePaths = new ActiveRoster();

  var required = this.schema.requiredPaths();
  for (var i = 0; i < required.length; ++i) {
    this._activePaths.require(required[i]);
  }

  this._doc = this._buildDoc(obj, fields);
  if (obj) this.set(obj, undefined, true);
  this._registerHooks();
}
function GraphObject ( obj , fields ) { this . isNew = true ; this . errors = undefined ; this . _saveError = undefined ; this . _validationError = undefined ; // this._adhocPaths = undefined; // this._removing = undefined; // this._inserting = undefined; // this.__version = undefined; this . __getters = { } ; // this.__id = undefined; // the type of container - node or relationship this . _activePaths = new ActiveRoster ( ) ; var required = this . schema . requiredPaths ( ) ; for ( var i = 0 ; i < required . length ; ++ i ) { this . _activePaths . require ( required [ i ] ) ; } this . _doc = this . _buildDoc ( obj , fields ) ; if ( obj ) this . set ( obj , undefined , true ) ; this . _registerHooks ( ) ; }
A wrapper object for a neo4j node or relationship
@param  {String} url        Url for the neo4j database.
@param  {Object} data       The properties of the neo4j object.
@param  {String} objectType node or relationship.
@return {Object}            The GraphObject object.
@api     private
A wrapper object for a neo4j node or relationship