detach (key, model) {
    if (!this.hasRelationship(key)) {
      throw Exception.forbiddenRelationship(key)
    }

    this.relationship(key).detach(model)

    this._emit(Model.DETACHED, { key, model: this, detached: model })

    return this
  }
/**
   * Detach a model from a relationship
   * @param key
   * @param model
   */
Detach a model from a relationship
@param key
@param model
Detach a model from a relationship @param key @param model
detach (key, model) {
    if (!this.hasRelationship(key)) {
      throw Exception.forbiddenRelationship(key)
    }
    this.relationship(key).detach(model)
    this._emit(Model.DETACHED, { key, model: this, detached: model })
    return this
  }
detach ( key , model ) { if ( ! this . hasRelationship ( key ) ) { throw Exception . forbiddenRelationship ( key ) } this . relationship ( key ) . detach ( model ) this . _emit ( Model . DETACHED , { key , model : this , detached : model } ) return this }
Detach a model from a relationship
 @param key
 @param model
Detach a model from a relationship @param key @param model