dist/uncompressed/skylark-utils/models.js
function(options) {
      options = langx.mixin({parse: true}, options);
      var entity = this;
      var success = options.success;
      options.success = function(resp) {
        var serverAttrs = options.parse ? entity.parse(resp, options) : resp;
        if (!entity.set(serverAttrs, options)) return false;
        if (success) success.call(options.context, entity, resp, options);
        entity.trigger('sync', entity, resp, options);
      };
      wrapError(this, options);
      return this.sync('read', this, options);
    }
function(options) {
      options = langx.mixin({parse: true}, options);
      var entity = this;
      var success = options.success;
      options.success = function(resp) {
        var serverAttrs = options.parse ? entity.parse(resp, options) : resp;
        if (!entity.set(serverAttrs, options)) return false;
        if (success) success.call(options.context, entity, resp, options);
        entity.trigger('sync', entity, resp, options);
      };
      wrapError(this, options);
      return this.sync('read', this, options);
    }
function ( options ) { options = langx . mixin ( { parse : true } , options ) ; var entity = this ; var success = options . success ; options . success = function ( resp ) { var serverAttrs = options . parse ? entity . parse ( resp , options ) : resp ; if ( ! entity . set ( serverAttrs , options ) ) return false ; if ( success ) success . call ( options . context , entity , resp , options ) ; entity . trigger ( 'sync' , entity , resp , options ) ; } ; wrapError ( this , options ) ; return this . sync ( 'read' , this , options ) ; }
Fetch the entity from the server, merging the response with the entity's local attributes. Any changed attributes will trigger a "change" event.
Fetch the entity from the server merging the response with the entity s local attributes . Any changed attributes will trigger a change event .