@mikro-orm/core 7.0.0-dev.173 → 7.0.0-dev.174

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.
@@ -1262,6 +1262,9 @@ export class MetadataDiscovery {
1262
1262
  // If targetKey is specified, use that property instead of PKs for referencedPKs
1263
1263
  prop.referencedPKs = prop.targetKey ? [prop.targetKey] : meta2.primaryKeys;
1264
1264
  prop.targetMeta = meta2;
1265
+ if (meta2.view) {
1266
+ prop.createForeignKeyConstraint = false;
1267
+ }
1265
1268
  if (!prop.formula && prop.persist === false && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && !prop.embedded) {
1266
1269
  prop.formula = table => `${table}.${this.platform.quoteIdentifier(prop.fieldNames[0])}`;
1267
1270
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
3
  "type": "module",
4
- "version": "7.0.0-dev.173",
4
+ "version": "7.0.0-dev.174",
5
5
  "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.",
6
6
  "exports": {
7
7
  "./package.json": "./package.json",
package/utils/Utils.js CHANGED
@@ -123,7 +123,7 @@ export function parseJsonSafe(value) {
123
123
  }
124
124
  export class Utils {
125
125
  static PK_SEPARATOR = '~~~';
126
- static #ORM_VERSION = '7.0.0-dev.173';
126
+ static #ORM_VERSION = '7.0.0-dev.174';
127
127
  /**
128
128
  * Checks if the argument is instance of `Object`. Returns false for arrays.
129
129
  */