whereClauses(knex, response) {
      let key;

      if (this.isJoined()) {
        const isBelongsTo = this.type === 'belongsTo';
        const targetTable = isBelongsTo ? this.parentTableName : this.joinTable();

        const column = isBelongsTo ? this.parentIdAttribute : this.key('foreignKey');

        key = `${targetTable}.${column}`;
      } else {
        const column = this.isInverse() ? this.targetIdAttribute : this.key('foreignKey');

        key = `${this.targetTableName}.${column}`;
      }

      const method = response ? 'whereIn' : 'where';
      const ids = response ? this.eagerKeys(response) : this.parentFk;
      knex[method](key, ids);

      if (this.isMorph()) {
        const table = this.targetTableName;
        const key = this.key('morphKey');
        const value = this.key('morphValue');
        knex.where(`${table}.${key}`, value);
      }
    }
Check that there isn't an incorrect foreign key set, versus the one passed in when the
relation was formed.

@param {Knex} knex Knex instance.
@param {object} response
@return {undefined}