UNPKG

@melchyore/adonis-auto-preload

Version:

Auto-preload multiple relationships when retrieving Lucid models

10 lines (9 loc) 452 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const utils_1 = require("@poppinss/utils"); class WrongRelationshipTypeException extends utils_1.Exception { static invoke(model) { return new this(`The model "${model}" has wrong relationships to be auto-preloaded. Only string and function types are allowed`, 500, 'E_WRONG_RELATIONSHIP_TYPE'); } } exports.default = WrongRelationshipTypeException;