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
23
24
25
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/**
 * Thrown when user tries to create entity id map from the mixed id value,
 * but id value is a single value when entity requires multiple values.
 */
var CannotCreateEntityIdMapError = /** @class */ (function (_super) {
    tslib_1.__extends(CannotCreateEntityIdMapError, _super);
    function CannotCreateEntityIdMapError(metadata, id) {
        var _this = _super.call(this) || this;
        _this.name = "CannotCreateEntityIdMapError";
        Object.setPrototypeOf(_this, CannotCreateEntityIdMapError.prototype);
        var objectExample = metadata.primaryColumns.reduce(function (object, column, index) {
            column.setEntityValue(object, index + 1);
            return object;
        }, {});
        _this.message = "Cannot use given entity id \"" + id + "\" because \"" + metadata.targetName + "\" contains multiple primary columns, you must provide object in following form: " + JSON.stringify(objectExample) + " as an id.";
        return _this;
    }
    return CannotCreateEntityIdMapError;
}(Error));
exports.CannotCreateEntityIdMapError = CannotCreateEntityIdMapError;
 
//# sourceMappingURL=CannotCreateEntityIdMapError.js.map