UNPKG

1.13 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4/**
5 * Thrown if custom repositories that extend AbstractRepository classes does not have managed entity.
6 */
7var CustomRepositoryDoesNotHaveEntityError = /** @class */ (function (_super) {
8 tslib_1.__extends(CustomRepositoryDoesNotHaveEntityError, _super);
9 function CustomRepositoryDoesNotHaveEntityError(repository) {
10 var _this = _super.call(this) || this;
11 _this.name = "CustomRepositoryDoesNotHaveEntityError";
12 Object.setPrototypeOf(_this, CustomRepositoryDoesNotHaveEntityError.prototype);
13 _this.message = "Custom repository " + (repository instanceof Function ? repository.name : repository.constructor.name) + " does not have managed entity. " +
14 "Did you forget to specify entity for it @EntityRepository(MyEntity)? ";
15 return _this;
16 }
17 return CustomRepositoryDoesNotHaveEntityError;
18}(Error));
19exports.CustomRepositoryDoesNotHaveEntityError = CustomRepositoryDoesNotHaveEntityError;
20
21//# sourceMappingURL=CustomRepositoryDoesNotHaveEntityError.js.map