lib/relations/has_many.js
function(instance) {
    var updates = _.object([[this.foreignKey, undefined]]);
    var query = this.objectsQuery(instance).update(updates);
    var after = this.afterClearingObjects.bind(this, instance);
    return query.execute().tap(after);
  }
function(instance) {
    var updates = _.object([[this.foreignKey, undefined]]);
    var query = this.objectsQuery(instance).update(updates);
    var after = this.afterClearingObjects.bind(this, instance);
    return query.execute().tap(after);
  }
function ( instance ) { var updates = _ . object ( [ [ this . foreignKey , undefined ] ] ) ; var query = this . objectsQuery ( instance ) . update ( updates ) ; var after = this . afterClearingObjects . bind ( this , instance ) ; return query . execute ( ) . tap ( after ) ; }
Perform the necessary updates to clear objects for this relation.

This method invalidates the {@link HasMany#objectsQuery}.

Mixins can override {@link HasMany#executeClear} to change the way clears
are performed when related objects are cleared. This is the default
implementation.

@method
@protected
@param {Model} instance The model instance on which to operate.
Perform the necessary updates to clear objects for this relation .