lib/relations/has_many_through.js
function(message) {
  return override(function() {
    if (!this._isToMany) {
      var modelName = this._modelClass.__identity__.__name__;
      var relationName = this._name;
      throw new Error(util.format('%s for non many-to-many through relation ' +
        '%s#%s.', message, modelName, relationName));
    }
    return this._super.apply(this, arguments);
  });
}
function(message) {
  return override(function() {
    if (!this._isToMany) {
      var modelName = this._modelClass.__identity__.__name__;
      var relationName = this._name;
      throw new Error(util.format('%s for non many-to-many through relation ' +
        '%s#%s.', message, modelName, relationName));
    }
    return this._super.apply(this, arguments);
  });
}
function ( message ) { return override ( function ( ) { if ( ! this . _isToMany ) { var modelName = this . _modelClass . __identity__ . __name__ ; var relationName = this . _name ; throw new Error ( util . format ( '%s for non many-to-many through relation ' + '%s#%s.' , message , modelName , relationName ) ) ; } return this . _super . apply ( this , arguments ) ; } ) ; }
A convenience function for creating a through-only method override that will
throw an exception if this is not a through relation configured as a simple
many-to-many.

@function HasMany~manyToManyOnly
@param {String} message The error message prefix.
@return {Function} The method.
@see {@link HasMany~throughOverride}
A convenience function for creating a through - only method override that will throw an exception if this is not a through relation configured as a simple many - to - many .