333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import * as tslib_1 from "tslib";
/**
 * Thrown when relation has array initialized which is forbidden my ORM.
 *
 * @see https://github.com/typeorm/typeorm/issues/1319
 * @see http://typeorm.io/#/relations-faq/avoid-relation-property-initializers
 */
var InitializedRelationError = /** @class */ (function (_super) {
    tslib_1.__extends(InitializedRelationError, _super);
    function InitializedRelationError(relation) {
        var _this = _super.call(this) || this;
        Object.setPrototypeOf(_this, InitializedRelationError.prototype);
        _this.message = "Array initializations are not allowed in entity relations. " +
            ("Please remove array initialization (= []) from \"" + relation.entityMetadata.targetName + "#" + relation.propertyPath + "\". ") +
            "This is ORM requirement to make relations to work properly. Refer docs for more information.";
        return _this;
    }
    return InitializedRelationError;
}(Error));
export { InitializedRelationError };
 
//# sourceMappingURL=InitializedRelationError.js.map