@mikro-orm/core 6.5.10-dev.19 → 6.5.10-dev.20

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.
@@ -12,11 +12,11 @@ export declare abstract class AbstractNamingStrategy implements NamingStrategy {
12
12
  /**
13
13
  * @inheritDoc
14
14
  */
15
- getEnumClassName(columnName: string, tableName: string, schemaName?: string): string;
15
+ getEnumClassName(columnName: string, tableName: string | undefined, schemaName?: string): string;
16
16
  /**
17
17
  * @inheritDoc
18
18
  */
19
- getEnumTypeName(columnName: string, tableName: string, schemaName?: string): string;
19
+ getEnumTypeName(columnName: string, tableName: string | undefined, schemaName?: string): string;
20
20
  /**
21
21
  * @inheritDoc
22
22
  */
@@ -51,7 +51,7 @@ class AbstractNamingStrategy {
51
51
  * @inheritDoc
52
52
  */
53
53
  getEnumClassName(columnName, tableName, schemaName) {
54
- return this.getEntityName(`${tableName}_${columnName}`, schemaName);
54
+ return this.getEntityName(tableName ? `${tableName}_${columnName}` : columnName, schemaName);
55
55
  }
56
56
  /**
57
57
  * @inheritDoc
@@ -25,7 +25,7 @@ export interface NamingStrategy {
25
25
  *
26
26
  * @return A new class name that will be used for the enum.
27
27
  */
28
- getEnumClassName(columnName: string, tableName: string, schemaName?: string): string;
28
+ getEnumClassName(columnName: string, tableName: string | undefined, schemaName?: string): string;
29
29
  /**
30
30
  * Get an enum type name. Used with `enumType: 'dictionary'` and `enumType: 'union-type'` entity generator option.
31
31
  *
@@ -35,7 +35,7 @@ export interface NamingStrategy {
35
35
  *
36
36
  * @return A new type name that will be used for the enum.
37
37
  */
38
- getEnumTypeName(columnName: string, tableName: string, schemaName?: string): string;
38
+ getEnumTypeName(columnName: string, tableName: string | undefined, schemaName?: string): string;
39
39
  /**
40
40
  * Get an enum option name for a given enum value.
41
41
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.5.10-dev.19",
3
+ "version": "6.5.10-dev.20",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -64,7 +64,7 @@
64
64
  "esprima": "4.0.1",
65
65
  "fs-extra": "11.3.2",
66
66
  "globby": "11.1.0",
67
- "mikro-orm": "6.5.10-dev.19",
67
+ "mikro-orm": "6.5.10-dev.20",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }