docs: function getAttributes(opts, raw) {
      var options = (0, _lodash2.default)({
        session: false,
        props: false,
        derived: false,
        children: true,
        collections: true
      }, opts || {});
      var res = {};
      for (var item in this._definition) {
        var def = this._definition[item];
        if (options.session && def.session || options.props && !def.session) {
          var val = raw ? this._values[item] : this[item];
          if (typeof val === 'undefined') {
            val = (0, _lodash8.default)(def, 'default');
          }
          if (typeof val !== 'undefined') {
            res[item] = val;
          }
        }
      }
      if (options.derived) {
        for (var item in this._derived) {
          res[item] = this[item];
        }
      }
      if (options.children) {
        for (var child in this._children) {
          if (this[child].getAttributes) {
            res[child] = this[child].getAttributes(options, raw);
          }
        }
      }
      if (options.collections) {
        for (var coll in this._collections) {
          res[coll] = this[coll].models;
        }
      }
      return res;
    }