UNPKG

typeorm

Version:

Data-Mapper ORM for TypeScript and ES2021+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.

21 lines (19 loc) 939 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InitializedRelationError = void 0; const TypeORMError_1 = require("./TypeORMError"); /** * Thrown when relation has array initialized which is forbidden my ORM. * * @see https://github.com/typeorm/typeorm/issues/1319 * @see http://typeorm.io/docs/Relations/relations-faq/#avoid-relation-property-initializers */ class InitializedRelationError extends TypeORMError_1.TypeORMError { constructor(relation) { super(`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.`); } } exports.InitializedRelationError = InitializedRelationError; //# sourceMappingURL=InitializedRelationError.js.map