parseId = function (id) {
    if(!_.isObject(this.attributes, this.primaryKey)) {
      return id;
    }
    var pkAttrDef = this.attributes[this.primaryKey];
    if(_.isPlainObject(pkAttrDef)) {
      if (pkAttrDef.type === 'number') {
        return parseInt(id);
      } else if (pkAttrDef.type === 'string') {
        return new String(id).toString(); //jshint ignore:line
      }
    }

    return id;
  }
pubsub hook

> Implements public resourceful pubsub (RPS) methods, as well as some
> private methods used by the blueprints hook.