@mikro-orm/core 7.0.7-dev.14 → 7.0.7-dev.15
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/metadata/MetadataDiscovery.js +4 -6
- package/package.json +1 -1
- package/utils/Utils.js +1 -1
|
@@ -428,13 +428,13 @@ export class MetadataDiscovery {
|
|
|
428
428
|
prop.fieldNames = this.initManyToManyFieldName(prop, prop.name);
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
initManyToOneFieldName(prop, name
|
|
431
|
+
initManyToOneFieldName(prop, name) {
|
|
432
432
|
const meta2 = prop.targetMeta;
|
|
433
433
|
const ret = [];
|
|
434
434
|
for (const primaryKey of meta2.primaryKeys) {
|
|
435
435
|
this.initFieldName(meta2.properties[primaryKey]);
|
|
436
436
|
for (const fieldName of meta2.properties[primaryKey].fieldNames) {
|
|
437
|
-
ret.push(this.#namingStrategy.joinKeyColumnName(name, fieldName, meta2.compositePK
|
|
437
|
+
ret.push(this.#namingStrategy.joinKeyColumnName(name, fieldName, meta2.compositePK));
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
return ret;
|
|
@@ -487,11 +487,9 @@ export class MetadataDiscovery {
|
|
|
487
487
|
prop.joinColumns ??= prop.referencedColumnNames.map(referencedColumnName => this.#namingStrategy.joinKeyColumnName(prop.discriminator, referencedColumnName, prop.referencedColumnNames.length > 1));
|
|
488
488
|
}
|
|
489
489
|
else {
|
|
490
|
-
|
|
491
|
-
prop.joinColumns ??= prop.referencedColumnNames.map(referencedColumnName => this.#namingStrategy.joinKeyColumnName(meta.root.className, referencedColumnName, meta.compositePK, ownerTableName));
|
|
490
|
+
prop.joinColumns ??= prop.referencedColumnNames.map(referencedColumnName => this.#namingStrategy.joinKeyColumnName(meta.root.className, referencedColumnName, meta.compositePK));
|
|
492
491
|
}
|
|
493
|
-
|
|
494
|
-
prop.inverseJoinColumns ??= this.initManyToOneFieldName(prop, meta2.root.className, inverseTableName);
|
|
492
|
+
prop.inverseJoinColumns ??= this.initManyToOneFieldName(prop, meta2.root.className);
|
|
495
493
|
}
|
|
496
494
|
isExplicitTableName(meta) {
|
|
497
495
|
return meta.tableName !== this.#namingStrategy.classToTableName(meta.className);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/core",
|
|
3
|
-
"version": "7.0.7-dev.
|
|
3
|
+
"version": "7.0.7-dev.15",
|
|
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
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
package/utils/Utils.js
CHANGED
|
@@ -132,7 +132,7 @@ export function parseJsonSafe(value) {
|
|
|
132
132
|
/** Collection of general-purpose utility methods used throughout the ORM. */
|
|
133
133
|
export class Utils {
|
|
134
134
|
static PK_SEPARATOR = '~~~';
|
|
135
|
-
static #ORM_VERSION = '7.0.7-dev.
|
|
135
|
+
static #ORM_VERSION = '7.0.7-dev.15';
|
|
136
136
|
/**
|
|
137
137
|
* Checks if the argument is instance of `Object`. Returns false for arrays.
|
|
138
138
|
*/
|