typeorm 0.3.26-dev.abf8863 → 0.3.26-dev.f2d2236
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/driver/sap/SapDriver.js +38 -41
- package/browser/driver/sap/SapDriver.js.map +1 -1
- package/browser/driver/types/ColumnTypes.d.ts +1 -1
- package/browser/driver/types/ColumnTypes.js.map +1 -1
- package/browser/metadata-builder/EntityMetadataValidator.js +4 -2
- package/browser/metadata-builder/EntityMetadataValidator.js.map +1 -1
- package/driver/sap/SapDriver.js +38 -41
- package/driver/sap/SapDriver.js.map +1 -1
- package/driver/types/ColumnTypes.d.ts +1 -1
- package/driver/types/ColumnTypes.js.map +1 -1
- package/metadata-builder/EntityMetadataValidator.js +4 -2
- package/metadata-builder/EntityMetadataValidator.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/metadata-builder/EntityMetadataValidator.ts"],"names":[],"mappings":";;;AACA,kFAA8E;AAC9E,4EAAwE;AACxE,+CAA2C;AAE3C,kFAA8E;AAE9E,8EAA0E;AAC1E,gFAA4E;AAC5E,oCAAuC;AACvC,uDAAmD;AAEnD,mEAAmE;AACnE,6FAA6F;AAC7F,sEAAsE;AACtE,mGAAmG;AACnG,2GAA2G;AAC3G,6DAA6D;AAC7D,uEAAuE;AACvE,iFAAiF;AAEjF,2FAA2F;AAC3F,wHAAwH;AACxH,gIAAgI;AAChI,mGAAmG;AACnG,8EAA8E;AAC9E,8CAA8C;AAC9C,yDAAyD;AAEzD;;GAEG;AACH,MAAa,uBAAuB;IAChC,4EAA4E;IAC5E,iBAAiB;IACjB,4EAA4E;IAE5E;;OAEG;IACH,YAAY,CAAC,eAAiC,EAAE,MAAc;QAC1D,eAAe,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE,CACvC,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,eAAe,EAAE,MAAM,CAAC,CACzD,C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;;OAEG;IACO,sBAAsB,CAAC,eAAiC;QAC9D,eAAe,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE;YACvC,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/C,IACI,QAAQ,CAAC,eAAe;oBACxB,QAAQ,CAAC,eAAe,CAAC,OAAO;oBAEhC,MAAM,IAAI,oBAAY,CAClB,2CAA2C;wBACvC,GAAG,cAAc,CAAC,UAAU,IAAI,QAAQ,CAAC,YAAY,gDAAgD;wBACrG,GAAG,QAAQ,CAAC,qBAAqB,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,kCAAkC;wBACvH,sDAAsD,CAC7D,CAAA;YACT,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC;CACJ;AAzUD,0DAyUC","file":"EntityMetadataValidator.js","sourcesContent":["import { EntityMetadata } from \"../metadata/EntityMetadata\"\nimport { MissingPrimaryColumnError } from \"../error/MissingPrimaryColumnError\"\nimport { CircularRelationsError } from \"../error/CircularRelationsError\"\nimport { DepGraph } from \"../util/DepGraph\"\nimport { Driver } from \"../driver/Driver\"\nimport { DataTypeNotSupportedError } from \"../error/DataTypeNotSupportedError\"\nimport { ColumnType } from \"../driver/types/ColumnTypes\"\nimport { NoConnectionOptionError } from \"../error/NoConnectionOptionError\"\nimport { InitializedRelationError } from \"../error/InitializedRelationError\"\nimport { TypeORMError } from \"../error\"\nimport { DriverUtils } from \"../driver/DriverUtils\"\n\n/// todo: add check if there are multiple tables with the same name\n/// todo: add checks when generated column / table names are too long for the specific driver\n// todo: type in function validation, inverse side function validation\n// todo: check on build for duplicate names, since naming checking was removed from MetadataStorage\n// todo: duplicate name checking for: table, relation, column, index, naming strategy, join tables/columns?\n// todo: check if multiple tree parent metadatas in validator\n// todo: tree decorators can be used only on closure table (validation)\n// todo: throw error if parent tree metadata was not specified in a closure table\n\n// todo: MetadataArgsStorage: type in function validation, inverse side function validation\n// todo: MetadataArgsStorage: check on build for duplicate names, since naming checking was removed from MetadataStorage\n// todo: MetadataArgsStorage: duplicate name checking for: table, relation, column, index, naming strategy, join tables/columns?\n// todo: MetadataArgsStorage: check for duplicate targets too since this check has been removed too\n// todo: check if relation decorator contains primary: true and nullable: true\n// todo: check column length, precision. scale\n// todo: MySQL index can be unique or spatial or fulltext\n\n/**\n * Validates built entity metadatas.\n */\nexport class EntityMetadataValidator {\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n\n /**\n * Validates all given entity metadatas.\n */\n validateMany(entityMetadatas: EntityMetadata[], driver: Driver) {\n entityMetadatas.forEach((entityMetadata) =>\n this.validate(entityMetadata, entityMetadatas, driver),\n )\n this.validateDependencies(entityMetadatas)\n this.validateEagerRelations(entityMetadatas)\n }\n\n /**\n * Validates given entity metadata.\n */\n validate(\n entityMetadata: EntityMetadata,\n allEntityMetadatas: EntityMetadata[],\n driver: Driver,\n ) {\n // check if table metadata has an id\n if (!entityMetadata.primaryColumns.length && !entityMetadata.isJunction)\n throw new MissingPrimaryColumnError(entityMetadata)\n\n // if entity has multiple primary keys and uses custom constraint name,\n // then all primary keys should have the same constraint name\n if (entityMetadata.primaryColumns.length > 1) {\n const areConstraintNamesEqual = entityMetadata.primaryColumns.every(\n (columnMetadata, i, columnMetadatas) =>\n columnMetadata.primaryKeyConstraintName ===\n columnMetadatas[0].primaryKeyConstraintName,\n )\n if (!areConstraintNamesEqual) {\n throw new TypeORMError(\n `Entity ${entityMetadata.name} has multiple primary columns with different constraint names. Constraint names should be the equal.`,\n )\n }\n }\n\n // validate if table is using inheritance it has a discriminator\n // also validate if discriminator values are not empty and not repeated\n if (\n entityMetadata.inheritancePattern === \"STI\" ||\n entityMetadata.tableType === \"entity-child\"\n ) {\n if (!entityMetadata.discriminatorColumn)\n throw new TypeORMError(\n `Entity ${entityMetadata.name} using single-table inheritance, it should also have a discriminator column. Did you forget to put discriminator column options?`,\n )\n\n if (typeof entityMetadata.discriminatorValue === \"undefined\")\n throw new TypeORMError(\n `Entity ${entityMetadata.name} has an undefined discriminator value. Discriminator value should be defined.`,\n )\n\n const sameDiscriminatorValueEntityMetadata =\n allEntityMetadatas.find((metadata) => {\n return (\n metadata !== entityMetadata &&\n (metadata.inheritancePattern === \"STI\" ||\n metadata.tableType === \"entity-child\") &&\n metadata.tableName === entityMetadata.tableName &&\n metadata.discriminatorValue ===\n entityMetadata.discriminatorValue &&\n metadata.inheritanceTree.some(\n (parent) =>\n entityMetadata.inheritanceTree.indexOf(\n parent,\n ) !== -1,\n )\n )\n })\n if (sameDiscriminatorValueEntityMetadata)\n throw new TypeORMError(\n `Entities ${entityMetadata.name} and ${sameDiscriminatorValueEntityMetadata.name} have the same discriminator values. Make sure they are different while using the @ChildEntity decorator.`,\n )\n }\n\n entityMetadata.relationCounts.forEach((relationCount) => {\n if (\n relationCount.relation.isManyToOne ||\n relationCount.relation.isOneToOne\n )\n throw new TypeORMError(\n `Relation count can not be implemented on ManyToOne or OneToOne relations.`,\n )\n })\n\n if (!(driver.options.type === \"mongodb\")) {\n entityMetadata.columns\n .filter((column) => !column.isVirtualProperty)\n .forEach((column) => {\n const normalizedColumn = driver.normalizeType(\n column,\n ) as ColumnType\n if (!driver.supportedDataTypes.includes(normalizedColumn))\n throw new DataTypeNotSupportedError(\n column,\n normalizedColumn,\n driver.options.type,\n )\n if (\n column.length &&\n !driver.withLengthColumnTypes.includes(normalizedColumn)\n )\n throw new TypeORMError(\n `Column ${column.propertyName} of Entity ${entityMetadata.name} does not support length property.`,\n )\n if (\n column.type === \"enum\" &&\n !column.enum &&\n !column.enumName\n )\n throw new TypeORMError(\n `Column \"${column.propertyName}\" of Entity \"${entityMetadata.name}\" is defined as enum, but missing \"enum\" or \"enumName\" properties.`,\n )\n })\n }\n\n if (\n DriverUtils.isMySQLFamily(driver) ||\n driver.options.type === \"aurora-mysql\"\n ) {\n const generatedColumns = entityMetadata.columns.filter(\n (column) =>\n column.isGenerated && column.generationStrategy !== \"uuid\",\n )\n if (generatedColumns.length > 1)\n throw new TypeORMError(\n `Error in ${entityMetadata.name} entity. There can be only one auto-increment column in MySql table.`,\n )\n }\n\n // for mysql we are able to not define a default selected database, instead all entities can have their database\n // defined in their decorators. To make everything work either all entities must have database define and we\n // can live without database set in the connection options, either database in the connection options must be set\n if (DriverUtils.isMySQLFamily(driver)) {\n const metadatasWithDatabase = allEntityMetadatas.filter(\n (metadata) => metadata.database,\n )\n if (metadatasWithDatabase.length === 0 && !driver.database)\n throw new NoConnectionOptionError(\"database\")\n }\n\n if (driver.options.type === \"mssql\") {\n const charsetColumns = entityMetadata.columns.filter(\n (column) => column.charset,\n )\n if (charsetColumns.length > 1)\n throw new TypeORMError(\n `Character set specifying is not supported in Sql Server`,\n )\n }\n\n // Postgres supports only STORED generated columns.\n if (driver.options.type === \"postgres\") {\n const virtualColumn = entityMetadata.columns.find(\n (column) =>\n column.asExpression &&\n (!column.generatedType ||\n column.generatedType === \"VIRTUAL\"),\n )\n if (virtualColumn)\n throw new TypeORMError(\n `Column \"${virtualColumn.propertyName}\" of Entity \"${entityMetadata.name}\" is defined as VIRTUAL, but Postgres supports only STORED generated columns.`,\n )\n }\n\n // check if relations are all without initialized properties\n const entityInstance = entityMetadata.create(undefined, {\n fromDeserializer: true,\n })\n entityMetadata.relations.forEach((relation) => {\n if (relation.isManyToMany || relation.isOneToMany) {\n // we skip relations for which persistence is disabled since initialization in them cannot harm somehow\n if (relation.persistenceEnabled === false) return\n\n // get entity relation value and check if its an array\n const relationInitializedValue =\n relation.getEntityValue(entityInstance)\n if (Array.isArray(relationInitializedValue))\n throw new InitializedRelationError(relation)\n }\n })\n\n // validate relations\n entityMetadata.relations.forEach((relation) => {\n // check OnDeleteTypes\n if (\n driver.supportedOnDeleteTypes &&\n relation.onDelete &&\n !driver.supportedOnDeleteTypes.includes(relation.onDelete)\n ) {\n throw new TypeORMError(\n `OnDeleteType \"${relation.onDelete}\" is not supported for ${driver.options.type}!`,\n )\n }\n\n // check OnUpdateTypes\n if (\n driver.supportedOnUpdateTypes &&\n relation.onUpdate &&\n !driver.supportedOnUpdateTypes.includes(relation.onUpdate)\n ) {\n throw new TypeORMError(\n `OnUpdateType \"${relation.onUpdate}\" is not valid for ${driver.options.type}!`,\n )\n }\n\n // check join tables:\n // using JoinTable is possible only on one side of the many-to-many relation\n // todo(dima): fix\n // if (relation.joinTable) {\n // if (!relation.isManyToMany)\n // throw new UsingJoinTableIsNotAllowedError(entityMetadata, relation);\n // // if there is inverse side of the relation, then check if it does not have join table too\n // if (relation.hasInverseSide && relation.inverseRelation.joinTable)\n // throw new UsingJoinTableOnlyOnOneSideAllowedError(entityMetadata, relation);\n // }\n // check join columns:\n // using JoinColumn is possible only on one side of the relation and on one-to-one, many-to-one relation types\n // first check if relation is one-to-one or many-to-one\n // todo(dima): fix\n /*if (relation.joinColumn) {\n\n // join column can be applied only on one-to-one and many-to-one relations\n if (!relation.isOneToOne && !relation.isManyToOne)\n throw new UsingJoinColumnIsNotAllowedError(entityMetadata, relation);\n\n // if there is inverse side of the relation, then check if it does not have join table too\n if (relation.hasInverseSide && relation.inverseRelation.joinColumn && relation.isOneToOne)\n throw new UsingJoinColumnOnlyOnOneSideAllowedError(entityMetadata, relation);\n\n // check if join column really has referenced column\n if (relation.joinColumn && !relation.joinColumn.referencedColumn)\n throw new TypeORMError(`Join column does not have referenced column set`);\n\n }\n\n // if its a one-to-one relation and JoinColumn is missing on both sides of the relation\n // or its one-side relation without JoinColumn we should give an error\n if (!relation.joinColumn && relation.isOneToOne && (!relation.hasInverseSide || !relation.inverseRelation.joinColumn))\n throw new MissingJoinColumnError(entityMetadata, relation);*/\n // if its a many-to-many relation and JoinTable is missing on both sides of the relation\n // or its one-side relation without JoinTable we should give an error\n // todo(dima): fix it\n // if (!relation.joinTable && relation.isManyToMany && (!relation.hasInverseSide || !relation.inverseRelation.joinTable))\n // throw new MissingJoinTableError(entityMetadata, relation);\n // todo: validate if its one-to-one and side which does not have join column MUST have inverse side\n // todo: validate if its many-to-many and side which does not have join table MUST have inverse side\n // todo: if there is a relation, and inverse side is specified only on one side, shall we give error\n // todo: with message like: \"Inverse side is specified only on one side of the relationship. Specify on other side too to prevent confusion\".\n // todo: add validation if there two entities with the same target, and show error message with description of the problem (maybe file was renamed/moved but left in output directory)\n // todo: check if there are multiple columns on the same column applied.\n // todo: check column type if is missing in relational databases (throw new TypeORMError(`Column type of ${type} cannot be determined.`);)\n // todo: include driver-specific checks. for example in mongodb empty prefixes are not allowed\n // todo: if multiple columns with same name - throw exception, including cases when columns are in embeds with same prefixes or without prefix at all\n // todo: if multiple primary key used, at least one of them must be unique or @Index decorator must be set on entity\n // todo: check if entity with duplicate names, some decorators exist\n })\n\n // make sure cascade remove is not set for both sides of relationships (can be set in OneToOne decorators)\n entityMetadata.relations.forEach((relation) => {\n const isCircularCascadeRemove =\n relation.isCascadeRemove &&\n relation.inverseRelation &&\n relation.inverseRelation!.isCascadeRemove\n if (isCircularCascadeRemove)\n throw new TypeORMError(\n `Relation ${entityMetadata.name}#${\n relation.propertyName\n } and ${relation.inverseRelation!.entityMetadata.name}#${\n relation.inverseRelation!.propertyName\n } both has cascade remove set. ` +\n `This may lead to unexpected circular removals. Please set cascade remove only from one side of relationship.`,\n )\n }) // todo: maybe better just deny removal from one to one relation without join column?\n }\n\n /**\n * Validates dependencies of the entity metadatas.\n */\n protected validateDependencies(entityMetadatas: EntityMetadata[]) {\n const graph = new DepGraph()\n entityMetadatas.forEach((entityMetadata) => {\n graph.addNode(entityMetadata.name)\n })\n entityMetadatas.forEach((entityMetadata) => {\n entityMetadata.relationsWithJoinColumns\n .filter((relation) => !relation.isNullable)\n .forEach((relation) => {\n graph.addDependency(\n entityMetadata.name,\n relation.inverseEntityMetadata.name,\n )\n })\n })\n try {\n graph.overallOrder()\n } catch (err) {\n throw new CircularRelationsError(\n err.toString().replace(\"Error: Dependency Cycle Found: \", \"\"),\n )\n }\n }\n\n /**\n * Validates eager relations to prevent circular dependency in them.\n */\n protected validateEagerRelations(entityMetadatas: EntityMetadata[]) {\n entityMetadatas.forEach((entityMetadata) => {\n entityMetadata.eagerRelations.forEach((relation) => {\n if (\n relation.inverseRelation &&\n relation.inverseRelation.isEager\n )\n throw new TypeORMError(\n `Circular eager relations are disallowed. ` +\n `${entityMetadata.targetName}#${relation.propertyPath} contains \"eager: true\", and its inverse side ` +\n `${relation.inverseEntityMetadata.targetName}#${relation.inverseRelation.propertyPath} contains \"eager: true\" as well.` +\n ` Remove \"eager: true\" from one side of the relation.`,\n )\n })\n })\n }\n}\n"],"sourceRoot":".."}
|
|
1
|
+
{"version":3,"sources":["../../src/metadata-builder/EntityMetadataValidator.ts"],"names":[],"mappings":";;;AACA,kFAA8E;AAC9E,4EAAwE;AACxE,+CAA2C;AAE3C,kFAA8E;AAE9E,8EAA0E;AAC1E,gFAA4E;AAC5E,oCAAuC;AACvC,uDAAmD;AAEnD,mEAAmE;AACnE,6FAA6F;AAC7F,sEAAsE;AACtE,mGAAmG;AACnG,2GAA2G;AAC3G,6DAA6D;AAC7D,uEAAuE;AACvE,iFAAiF;AAEjF,2FAA2F;AAC3F,wHAAwH;AACxH,gIAAgI;AAChI,mGAAmG;AACnG,8EAA8E;AAC9E,8CAA8C;AAC9C,yDAAyD;AAEzD;;GAEG;AACH,MAAa,uBAAuB;IAChC,4EAA4E;IAC5E,iBAAiB;IACjB,4EAA4E;IAE5E;;OAEG;IACH,YAAY,CAAC,eAAiC,EAAE,MAAc;QAC1D,eAAe,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE,CACvC,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,eAAe,EAAE,MAAM,CAAC,CACzD,CAAA;QACD,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAA;QAC1C,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,CAAA;IAChD,CAAC;IAED;;OAEG;IACH,QAAQ,CACJ,cAA8B,EAC9B,kBAAoC,EACpC,MAAc;QA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AAc,EAAE,EAAE;YACvC,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/C,IACI,QAAQ,CAAC,eAAe;oBACxB,QAAQ,CAAC,eAAe,CAAC,OAAO;oBAEhC,MAAM,IAAI,oBAAY,CAClB,2CAA2C;wBACvC,GAAG,cAAc,CAAC,UAAU,IAAI,QAAQ,CAAC,YAAY,gDAAgD;wBACrG,GAAG,QAAQ,CAAC,qBAAqB,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,kCAAkC;wBACvH,sDAAsD,CAC7D,CAAA;YACT,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC;CACJ;AAhVD,0DAgVC","file":"EntityMetadataValidator.js","sourcesContent":["import { EntityMetadata } from \"../metadata/EntityMetadata\"\nimport { MissingPrimaryColumnError } from \"../error/MissingPrimaryColumnError\"\nimport { CircularRelationsError } from \"../error/CircularRelationsError\"\nimport { DepGraph } from \"../util/DepGraph\"\nimport { Driver } from \"../driver/Driver\"\nimport { DataTypeNotSupportedError } from \"../error/DataTypeNotSupportedError\"\nimport { ColumnType } from \"../driver/types/ColumnTypes\"\nimport { NoConnectionOptionError } from \"../error/NoConnectionOptionError\"\nimport { InitializedRelationError } from \"../error/InitializedRelationError\"\nimport { TypeORMError } from \"../error\"\nimport { DriverUtils } from \"../driver/DriverUtils\"\n\n/// todo: add check if there are multiple tables with the same name\n/// todo: add checks when generated column / table names are too long for the specific driver\n// todo: type in function validation, inverse side function validation\n// todo: check on build for duplicate names, since naming checking was removed from MetadataStorage\n// todo: duplicate name checking for: table, relation, column, index, naming strategy, join tables/columns?\n// todo: check if multiple tree parent metadatas in validator\n// todo: tree decorators can be used only on closure table (validation)\n// todo: throw error if parent tree metadata was not specified in a closure table\n\n// todo: MetadataArgsStorage: type in function validation, inverse side function validation\n// todo: MetadataArgsStorage: check on build for duplicate names, since naming checking was removed from MetadataStorage\n// todo: MetadataArgsStorage: duplicate name checking for: table, relation, column, index, naming strategy, join tables/columns?\n// todo: MetadataArgsStorage: check for duplicate targets too since this check has been removed too\n// todo: check if relation decorator contains primary: true and nullable: true\n// todo: check column length, precision. scale\n// todo: MySQL index can be unique or spatial or fulltext\n\n/**\n * Validates built entity metadatas.\n */\nexport class EntityMetadataValidator {\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n\n /**\n * Validates all given entity metadatas.\n */\n validateMany(entityMetadatas: EntityMetadata[], driver: Driver) {\n entityMetadatas.forEach((entityMetadata) =>\n this.validate(entityMetadata, entityMetadatas, driver),\n )\n this.validateDependencies(entityMetadatas)\n this.validateEagerRelations(entityMetadatas)\n }\n\n /**\n * Validates given entity metadata.\n */\n validate(\n entityMetadata: EntityMetadata,\n allEntityMetadatas: EntityMetadata[],\n driver: Driver,\n ) {\n // check if table metadata has an id\n if (!entityMetadata.primaryColumns.length && !entityMetadata.isJunction)\n throw new MissingPrimaryColumnError(entityMetadata)\n\n // if entity has multiple primary keys and uses custom constraint name,\n // then all primary keys should have the same constraint name\n if (entityMetadata.primaryColumns.length > 1) {\n const areConstraintNamesEqual = entityMetadata.primaryColumns.every(\n (columnMetadata, i, columnMetadatas) =>\n columnMetadata.primaryKeyConstraintName ===\n columnMetadatas[0].primaryKeyConstraintName,\n )\n if (!areConstraintNamesEqual) {\n throw new TypeORMError(\n `Entity ${entityMetadata.name} has multiple primary columns with different constraint names. Constraint names should be the equal.`,\n )\n }\n }\n\n // validate if table is using inheritance it has a discriminator\n // also validate if discriminator values are not empty and not repeated\n if (\n entityMetadata.inheritancePattern === \"STI\" ||\n entityMetadata.tableType === \"entity-child\"\n ) {\n if (!entityMetadata.discriminatorColumn)\n throw new TypeORMError(\n `Entity ${entityMetadata.name} using single-table inheritance, it should also have a discriminator column. Did you forget to put discriminator column options?`,\n )\n\n if (typeof entityMetadata.discriminatorValue === \"undefined\")\n throw new TypeORMError(\n `Entity ${entityMetadata.name} has an undefined discriminator value. Discriminator value should be defined.`,\n )\n\n const sameDiscriminatorValueEntityMetadata =\n allEntityMetadatas.find((metadata) => {\n return (\n metadata !== entityMetadata &&\n (metadata.inheritancePattern === \"STI\" ||\n metadata.tableType === \"entity-child\") &&\n metadata.tableName === entityMetadata.tableName &&\n metadata.discriminatorValue ===\n entityMetadata.discriminatorValue &&\n metadata.inheritanceTree.some(\n (parent) =>\n entityMetadata.inheritanceTree.indexOf(\n parent,\n ) !== -1,\n )\n )\n })\n if (sameDiscriminatorValueEntityMetadata)\n throw new TypeORMError(\n `Entities ${entityMetadata.name} and ${sameDiscriminatorValueEntityMetadata.name} have the same discriminator values. Make sure they are different while using the @ChildEntity decorator.`,\n )\n }\n\n entityMetadata.relationCounts.forEach((relationCount) => {\n if (\n relationCount.relation.isManyToOne ||\n relationCount.relation.isOneToOne\n )\n throw new TypeORMError(\n `Relation count can not be implemented on ManyToOne or OneToOne relations.`,\n )\n })\n\n if (!(driver.options.type === \"mongodb\")) {\n entityMetadata.columns\n .filter((column) => !column.isVirtualProperty)\n .forEach((column) => {\n const normalizedColumn = driver.normalizeType(\n column,\n ) as ColumnType\n if (\n driver.supportedDataTypes.indexOf(normalizedColumn) ===\n -1\n )\n throw new DataTypeNotSupportedError(\n column,\n normalizedColumn,\n driver.options.type,\n )\n if (\n column.length &&\n driver.withLengthColumnTypes.indexOf(\n normalizedColumn,\n ) === -1\n )\n throw new TypeORMError(\n `Column ${column.propertyName} of Entity ${entityMetadata.name} does not support length property.`,\n )\n if (\n column.type === \"enum\" &&\n !column.enum &&\n !column.enumName\n )\n throw new TypeORMError(\n `Column \"${column.propertyName}\" of Entity \"${entityMetadata.name}\" is defined as enum, but missing \"enum\" or \"enumName\" properties.`,\n )\n })\n }\n\n if (\n DriverUtils.isMySQLFamily(driver) ||\n driver.options.type === \"aurora-mysql\"\n ) {\n const generatedColumns = entityMetadata.columns.filter(\n (column) =>\n column.isGenerated && column.generationStrategy !== \"uuid\",\n )\n if (generatedColumns.length > 1)\n throw new TypeORMError(\n `Error in ${entityMetadata.name} entity. There can be only one auto-increment column in MySql table.`,\n )\n }\n\n // for mysql we are able to not define a default selected database, instead all entities can have their database\n // defined in their decorators. To make everything work either all entities must have database define and we\n // can live without database set in the connection options, either database in the connection options must be set\n if (DriverUtils.isMySQLFamily(driver)) {\n const metadatasWithDatabase = allEntityMetadatas.filter(\n (metadata) => metadata.database,\n )\n if (metadatasWithDatabase.length === 0 && !driver.database)\n throw new NoConnectionOptionError(\"database\")\n }\n\n if (driver.options.type === \"mssql\") {\n const charsetColumns = entityMetadata.columns.filter(\n (column) => column.charset,\n )\n if (charsetColumns.length > 1)\n throw new TypeORMError(\n `Character set specifying is not supported in Sql Server`,\n )\n }\n\n // Postgres supports only STORED generated columns.\n if (driver.options.type === \"postgres\") {\n const virtualColumn = entityMetadata.columns.find(\n (column) =>\n column.asExpression &&\n (!column.generatedType ||\n column.generatedType === \"VIRTUAL\"),\n )\n if (virtualColumn)\n throw new TypeORMError(\n `Column \"${virtualColumn.propertyName}\" of Entity \"${entityMetadata.name}\" is defined as VIRTUAL, but Postgres supports only STORED generated columns.`,\n )\n }\n\n // check if relations are all without initialized properties\n const entityInstance = entityMetadata.create(undefined, {\n fromDeserializer: true,\n })\n entityMetadata.relations.forEach((relation) => {\n if (relation.isManyToMany || relation.isOneToMany) {\n // we skip relations for which persistence is disabled since initialization in them cannot harm somehow\n if (relation.persistenceEnabled === false) return\n\n // get entity relation value and check if its an array\n const relationInitializedValue =\n relation.getEntityValue(entityInstance)\n if (Array.isArray(relationInitializedValue))\n throw new InitializedRelationError(relation)\n }\n })\n\n // validate relations\n entityMetadata.relations.forEach((relation) => {\n // check OnDeleteTypes\n if (\n driver.supportedOnDeleteTypes &&\n relation.onDelete &&\n !driver.supportedOnDeleteTypes.includes(relation.onDelete)\n ) {\n throw new TypeORMError(\n `OnDeleteType \"${relation.onDelete}\" is not supported for ${driver.options.type}!`,\n )\n }\n\n // check OnUpdateTypes\n if (\n driver.supportedOnUpdateTypes &&\n relation.onUpdate &&\n !driver.supportedOnUpdateTypes.includes(relation.onUpdate)\n ) {\n throw new TypeORMError(\n `OnUpdateType \"${relation.onUpdate}\" is not valid for ${driver.options.type}!`,\n )\n }\n\n // check join tables:\n // using JoinTable is possible only on one side of the many-to-many relation\n // todo(dima): fix\n // if (relation.joinTable) {\n // if (!relation.isManyToMany)\n // throw new UsingJoinTableIsNotAllowedError(entityMetadata, relation);\n // // if there is inverse side of the relation, then check if it does not have join table too\n // if (relation.hasInverseSide && relation.inverseRelation.joinTable)\n // throw new UsingJoinTableOnlyOnOneSideAllowedError(entityMetadata, relation);\n // }\n // check join columns:\n // using JoinColumn is possible only on one side of the relation and on one-to-one, many-to-one relation types\n // first check if relation is one-to-one or many-to-one\n // todo(dima): fix\n /*if (relation.joinColumn) {\n\n // join column can be applied only on one-to-one and many-to-one relations\n if (!relation.isOneToOne && !relation.isManyToOne)\n throw new UsingJoinColumnIsNotAllowedError(entityMetadata, relation);\n\n // if there is inverse side of the relation, then check if it does not have join table too\n if (relation.hasInverseSide && relation.inverseRelation.joinColumn && relation.isOneToOne)\n throw new UsingJoinColumnOnlyOnOneSideAllowedError(entityMetadata, relation);\n\n // check if join column really has referenced column\n if (relation.joinColumn && !relation.joinColumn.referencedColumn)\n throw new TypeORMError(`Join column does not have referenced column set`);\n\n }\n\n // if its a one-to-one relation and JoinColumn is missing on both sides of the relation\n // or its one-side relation without JoinColumn we should give an error\n if (!relation.joinColumn && relation.isOneToOne && (!relation.hasInverseSide || !relation.inverseRelation.joinColumn))\n throw new MissingJoinColumnError(entityMetadata, relation);*/\n // if its a many-to-many relation and JoinTable is missing on both sides of the relation\n // or its one-side relation without JoinTable we should give an error\n // todo(dima): fix it\n // if (!relation.joinTable && relation.isManyToMany && (!relation.hasInverseSide || !relation.inverseRelation.joinTable))\n // throw new MissingJoinTableError(entityMetadata, relation);\n // todo: validate if its one-to-one and side which does not have join column MUST have inverse side\n // todo: validate if its many-to-many and side which does not have join table MUST have inverse side\n // todo: if there is a relation, and inverse side is specified only on one side, shall we give error\n // todo: with message like: \"Inverse side is specified only on one side of the relationship. Specify on other side too to prevent confusion\".\n // todo: add validation if there two entities with the same target, and show error message with description of the problem (maybe file was renamed/moved but left in output directory)\n // todo: check if there are multiple columns on the same column applied.\n // todo: check column type if is missing in relational databases (throw new TypeORMError(`Column type of ${type} cannot be determined.`);)\n // todo: include driver-specific checks. for example in mongodb empty prefixes are not allowed\n // todo: if multiple columns with same name - throw exception, including cases when columns are in embeds with same prefixes or without prefix at all\n // todo: if multiple primary key used, at least one of them must be unique or @Index decorator must be set on entity\n // todo: check if entity with duplicate names, some decorators exist\n })\n\n // make sure cascade remove is not set for both sides of relationships (can be set in OneToOne decorators)\n entityMetadata.relations.forEach((relation) => {\n const isCircularCascadeRemove =\n relation.isCascadeRemove &&\n relation.inverseRelation &&\n relation.inverseRelation!.isCascadeRemove\n if (isCircularCascadeRemove)\n throw new TypeORMError(\n `Relation ${entityMetadata.name}#${\n relation.propertyName\n } and ${relation.inverseRelation!.entityMetadata.name}#${\n relation.inverseRelation!.propertyName\n } both has cascade remove set. ` +\n `This may lead to unexpected circular removals. Please set cascade remove only from one side of relationship.`,\n )\n }) // todo: maybe better just deny removal from one to one relation without join column?\n\n entityMetadata.eagerRelations.forEach((relation) => {})\n }\n\n /**\n * Validates dependencies of the entity metadatas.\n */\n protected validateDependencies(entityMetadatas: EntityMetadata[]) {\n const graph = new DepGraph()\n entityMetadatas.forEach((entityMetadata) => {\n graph.addNode(entityMetadata.name)\n })\n entityMetadatas.forEach((entityMetadata) => {\n entityMetadata.relationsWithJoinColumns\n .filter((relation) => !relation.isNullable)\n .forEach((relation) => {\n graph.addDependency(\n entityMetadata.name,\n relation.inverseEntityMetadata.name,\n )\n })\n })\n try {\n graph.overallOrder()\n } catch (err) {\n throw new CircularRelationsError(\n err.toString().replace(\"Error: Dependency Cycle Found: \", \"\"),\n )\n }\n }\n\n /**\n * Validates eager relations to prevent circular dependency in them.\n */\n protected validateEagerRelations(entityMetadatas: EntityMetadata[]) {\n entityMetadatas.forEach((entityMetadata) => {\n entityMetadata.eagerRelations.forEach((relation) => {\n if (\n relation.inverseRelation &&\n relation.inverseRelation.isEager\n )\n throw new TypeORMError(\n `Circular eager relations are disallowed. ` +\n `${entityMetadata.targetName}#${relation.propertyPath} contains \"eager: true\", and its inverse side ` +\n `${relation.inverseEntityMetadata.targetName}#${relation.inverseRelation.propertyPath} contains \"eager: true\" as well.` +\n ` Remove \"eager: true\" from one side of the relation.`,\n )\n })\n })\n }\n}\n"],"sourceRoot":".."}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "typeorm", "version": "0.3.26-dev.
|
|
1
|
+
{ "name": "typeorm", "version": "0.3.26-dev.f2d2236", "description": "Data-Mapper ORM for TypeScript and ES2021+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.", "homepage": "https://typeorm.io", "bugs": { "url": "https://github.com/typeorm/typeorm/issues" }, "repository": { "type": "git", "url": "https://github.com/typeorm/typeorm.git" }, "funding": "https://opencollective.com/typeorm", "license": "MIT", "author": { "name": "Umed Khudoiberdiev", "email": "pleerock.me@gmail.com" }, "exports": { ".": { "types": "./index.d.ts", "node": { "import": "./index.mjs", "require": "./index.js", "types": "./index.d.ts" }, "browser": { "require": "./index.js", "import": "./browser/index.js", "default": "./index.js" } }, "./browser": { "types": "./index.d.ts", "default": "./browser/index.js" }, "./*.js": "./*.js", "./*": { "require": "./*.js", "import": "./*" } }, "main": "./index.js", "module": "./index.mjs", "browser": { "./browser/connection/ConnectionOptionsReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js", "./browser/connection/options-reader/ConnectionOptionsXmlReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js", "./browser/connection/options-reader/ConnectionOptionsYmlReader.js": "./browser/platform/BrowserConnectionOptionsReaderDummy.js", "./browser/driver/aurora-data-api/AuroraDataApiDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/better-sqlite3/BetterSqlite3Driver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/cockroachdb/CockroachDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/MongoDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/MongoQueryRunner.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/bson.typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mysql/MysqlDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/oracle/OracleDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/postgres/PostgresDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/sap/SapDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/sqlite/SqliteDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/sqlserver/SqlServerDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/entity-manager/MongoEntityManager.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/logger/FileLogger.js": "./browser/platform/BrowserFileLoggerDummy.js", "./browser/platform/PlatformTools.js": "./browser/platform/BrowserPlatformTools.js", "./browser/repository/MongoRepository.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/util/DirectoryExportedClassesLoader.js": "./browser/platform/BrowserDirectoryExportedClassesLoader.js", "./index.js": "./browser/index.js", "./index.mjs": "./browser/index.js" }, "types": "./index.d.ts", "bin": { "typeorm": "./cli.js", "typeorm-ts-node-commonjs": "./cli-ts-node-commonjs.js", "typeorm-ts-node-esm": "./cli-ts-node-esm.js" }, "scripts": { "changelog": "standard-changelog", "compile": "rimraf ./build && tsc", "docs:dev": "cd docs && npm run start", "format": "prettier --cache --write \"./**/*.ts\"", "format:ci": "prettier --check \"./**/*.ts\"", "lint": "eslint .", "pack": "gulp pack", "package": "gulp package", "pre-commit": "lint-staged", "prepare": "husky", "publish:preview": "pkg-pr-new publish './build/package' --pnpm --template='./sample/playground'", "test": "npm run compile && npm run test:fast --", "test:ci": "mocha --bail", "test:fast": "mocha", "typecheck": "tsc --noEmit", "watch": "tsc --watch" }, "dependencies": { "@sqltools/formatter": "^1.2.5", "ansis": "^3.17.0", "app-root-path": "^3.1.0", "buffer": "^6.0.3", "dayjs": "^1.11.13", "debug": "^4.4.0", "dedent": "^1.6.0", "dotenv": "^16.4.7", "glob": "^10.4.5", "sha.js": "^2.4.11", "sql-highlight": "^6.0.0", "tslib": "^2.8.1", "uuid": "^11.1.0", "yargs": "^17.7.2" }, "devDependencies": { "@eslint/js": "^9.28.0", "@sap/hana-client": "^2.24.21", "@tsconfig/node16": "^16.1.4", "@types/chai": "^4.3.20", "@types/chai-as-promised": "^7.1.8", "@types/debug": "^4.1.12", "@types/gulp-rename": "^2.0.6", "@types/gulp-sourcemaps": "^0.0.38", "@types/mocha": "^10.0.10", "@types/node": "^16.18.126", "@types/sha.js": "^2.4.4", "@types/sinon": "^10.0.20", "@types/sinon-chai": "^4.0.0", "@types/source-map-support": "^0.5.10", "@types/yargs": "^17.0.33", "better-sqlite3": "^8.7.0", "chai": "^4.5.0", "chai-as-promised": "^7.1.2", "class-transformer": "^0.5.1", "eslint": "^9.28.0", "globals": "^16.2.0", "gulp": "^4.0.2", "gulp-rename": "^2.0.0", "gulp-replace": "^1.1.4", "gulp-shell": "^0.8.0", "gulp-sourcemaps": "^3.0.0", "gulp-typescript": "^6.0.0-alpha.1", "gulpclass": "^0.2.0", "hdb-pool": "^0.1.6", "husky": "^9.1.7", "lint-staged": "^15.5.2", "mocha": "^10.8.2", "mongodb": "^6.15.0", "mssql": "^11.0.1", "mysql": "^2.18.1", "mysql2": "^3.14.0", "nyc": "^17.1.0", "oracledb": "^6.8.0", "pg": "^8.14.1", "pg-query-stream": "^4.8.1", "pkg-pr-new": "^0.0.43", "prettier": "^2.8.8", "redis": "^4.7.0", "remap-istanbul": "^0.13.0", "rimraf": "^5.0.10", "sinon": "^15.2.0", "sinon-chai": "^3.7.0", "sort-package-json": "^2.15.1", "source-map-support": "^0.5.21", "sql.js": "^1.13.0", "sqlite3": "^5.1.7", "standard-changelog": "^6.0.0", "ts-node": "^10.9.2", "typescript": "^5.8.3", "typescript-eslint": "^8.33.1" }, "peerDependencies": { "@google-cloud/spanner": "^5.18.0 || ^6.0.0 || ^7.0.0", "@sap/hana-client": "^2.12.25", "better-sqlite3": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0", "hdb-pool": "^0.1.6", "ioredis": "^5.0.4", "mongodb": "^5.8.0 || ^6.0.0", "mssql": "^9.1.1 || ^10.0.1 || ^11.0.1", "mysql2": "^2.2.5 || ^3.0.1", "oracledb": "^6.3.0", "pg": "^8.5.1", "pg-native": "^3.0.0", "pg-query-stream": "^4.0.0", "redis": "^3.1.1 || ^4.0.0", "reflect-metadata": "^0.1.14 || ^0.2.0", "sql.js": "^1.4.0", "sqlite3": "^5.0.3", "ts-node": "^10.7.0", "typeorm-aurora-data-api-driver": "^2.0.0 || ^3.0.0" }, "peerDependenciesMeta": { "@google-cloud/spanner": { "optional": true }, "@sap/hana-client": { "optional": true }, "better-sqlite3": { "optional": true }, "hdb-pool": { "optional": true }, "ioredis": { "optional": true }, "mongodb": { "optional": true }, "mssql": { "optional": true }, "mysql2": { "optional": true }, "oracledb": { "optional": true }, "pg": { "optional": true }, "pg-native": { "optional": true }, "pg-query-stream": { "optional": true }, "redis": { "optional": true }, "sql.js": { "optional": true }, "sqlite3": { "optional": true }, "ts-node": { "optional": true }, "typeorm-aurora-data-api-driver": { "optional": true } }, "engines": { "node": ">=16.13.0" }, "collective": { "type": "opencollective", "url": "https://opencollective.com/typeorm", "logo": "https://opencollective.com/opencollective/logo.txt" }, "readmeFilename": "README.md", "tags": [ "orm", "typescript", "typescript-orm", "mariadb", "mariadb-orm", "mysql", "mysql-orm", "oracle", "oracle-orm", "postgresql", "postgresql-orm", "sap-hana", "sap-hana-orm", "spanner", "cloud-spanner", "cloud-spanner-orm", "sqlite", "sqlite-orm", "sql-server", "sql-server-orm" ] }
|