function Relation(relatedMapper) {
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  utils.classCallCheck(this, Relation);
  options.type = this.constructor.TYPE_NAME;
  this.validateOptions(relatedMapper, options);

  if (_typeof(relatedMapper) === 'object') {
    Object.defineProperty(this, 'relatedMapper', {
      value: relatedMapper
    });
  }

  Object.defineProperty(this, 'inverse', {
    writable: true
  });
  utils.fillIn(this, options);
}
Create a subclass of this Query:
@example <caption>Query.extend</caption>
const JSData = require('js-data');
const { Query } = JSData;
console.log('Using JSData v' + JSData.version.full);

// Extend the class using ES2015 class syntax.
class CustomQueryClass extends Query {
  foo () { return 'bar'; }
  static beep () { return 'boop'; }
}
const customQuery = new CustomQueryClass();
console.log(customQuery.foo());
console.log(CustomQueryClass.beep());

// Extend the class using alternate method.
const OtherQueryClass = Query.extend({
  foo () { return 'bar'; }
}, {
  beep () { return 'boop'; }
});
const otherQuery = new OtherQueryClass();
console.log(otherQuery.foo());
console.log(OtherQueryClass.beep());

// Extend the class, providing a custom constructor.
function AnotherQueryClass (collection) {
  Query.call(this, collection);
  this.created_at = new Date().getTime();
}
Query.extend({
  constructor: AnotherQueryClass,
  foo () { return 'bar'; }
}, {
  beep () { return 'boop'; }
});
const anotherQuery = new AnotherQueryClass();
console.log(anotherQuery.created_at);
console.log(anotherQuery.foo());
console.log(AnotherQueryClass.beep());

@method Query.extend
@param {object} [props={}] Properties to add to the prototype of the
subclass.
@param {object} [props.constructor] Provide a custom constructor function
to be used as the subclass itself.
@param {object} [classProps={}] Static properties to add to the subclass.
@returns {Constructor} Subclass of this Query class.
@since 3.0.0