"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UsingJoinColumnOnlyOnOneSideAllowedError = void 0;
var tslib_1 = require("tslib");
var TypeORMError_1 = require("./TypeORMError");
var UsingJoinColumnOnlyOnOneSideAllowedError = /** @class */ (function (_super) {
    (0, tslib_1.__extends)(UsingJoinColumnOnlyOnOneSideAllowedError, _super);
    function UsingJoinColumnOnlyOnOneSideAllowedError(entityMetadata, relation) {
        return _super.call(this, "Using JoinColumn is allowed only on one side of the one-to-one relationship. " +
            ("Both " + entityMetadata.name + "#" + relation.propertyName + " and " + relation.inverseEntityMetadata.name + "#" + relation.inverseRelation.propertyName + " ") +
            "has JoinTable decorators. Choose one of them and left JoinTable decorator only on it.") || this;
    }
    return UsingJoinColumnOnlyOnOneSideAllowedError;
}(TypeORMError_1.TypeORMError));
exports.UsingJoinColumnOnlyOnOneSideAllowedError = UsingJoinColumnOnlyOnOneSideAllowedError;

//# sourceMappingURL=UsingJoinColumnOnlyOnOneSideAllowedError.js.map
