UNPKG

1.26 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4/**
5 */
6var MissingJoinTableError = /** @class */ (function (_super) {
7 tslib_1.__extends(MissingJoinTableError, _super);
8 function MissingJoinTableError(entityMetadata, relation) {
9 var _this = _super.call(this) || this;
10 _this.name = "MissingJoinTableError";
11 Object.setPrototypeOf(_this, MissingJoinTableError.prototype);
12 if (relation.inverseRelation) {
13 _this.message = "JoinTable is missing on both sides of " + entityMetadata.name + "#" + relation.propertyName + " and " +
14 (relation.inverseEntityMetadata.name + "#" + relation.inverseRelation.propertyName + " many-to-many relationship. ") +
15 "You need to put decorator decorator on one of the sides.";
16 }
17 else {
18 _this.message = "JoinTable is missing on " + entityMetadata.name + "#" + relation.propertyName + " many-to-many relationship. " +
19 "You need to put JoinTable decorator on it.";
20 }
21 return _this;
22 }
23 return MissingJoinTableError;
24}(Error));
25exports.MissingJoinTableError = MissingJoinTableError;
26
27//# sourceMappingURL=MissingJoinTableError.js.map