repositories/lib/services/entity.repository.js
function _validateIsModel(model) {
  let parentClass = Object.getPrototypeOf(model);
  while (parentClass.name !== 'Model' && parentClass.name !== '') {
    parentClass = Object.getPrototypeOf(parentClass);
  }
  validationUtils.booleanTrue(
    parentClass.name === 'Model',
    'Parameter is not an Objection.js model'
  );
}
function _validateIsModel(model) {
  let parentClass = Object.getPrototypeOf(model);
  while (parentClass.name !== 'Model' && parentClass.name !== '') {
    parentClass = Object.getPrototypeOf(parentClass);
  }
  validationUtils.booleanTrue(
    parentClass.name === 'Model',
    'Parameter is not an Objection.js model'
  );
}
function _validateIsModel ( model ) { let parentClass = Object . getPrototypeOf ( model ) ; while ( parentClass . name !== 'Model' && parentClass . name !== '' ) { parentClass = Object . getPrototypeOf ( parentClass ) ; } validationUtils . booleanTrue ( parentClass . name === 'Model' , 'Parameter is not an Objection.js model' ) ; }
This is only invoked on the startup, so we can make this check non-trivial
This is only invoked on the startup so we can make this check non - trivial