@mikro-orm/sql 7.1.15-dev.7 → 7.1.15-dev.8

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.
@@ -1649,6 +1649,11 @@ export class AbstractSqlDriver extends DatabaseDriver {
1649
1649
  if (prop.kind === ReferenceKind.ONE_TO_ONE && prop.mapToPk && prop.owner) {
1650
1650
  return false;
1651
1651
  }
1652
+ // Polymorphic to-one flattened from an object embeddable lives inside a JSON column, so the join
1653
+ // conditions would need JSON extraction for both the discriminator and the FK; fall back to SELECT_IN.
1654
+ if (prop.polymorphic && prop.object && prop.embedded) {
1655
+ return false;
1656
+ }
1652
1657
  if (strategy !== LoadStrategy.JOINED) {
1653
1658
  // force joined strategy for explicit 1:1 owner populate hint as it would require a join anyway
1654
1659
  return prop.kind === ReferenceKind.ONE_TO_ONE && !prop.owner;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/sql",
3
- "version": "7.1.15-dev.7",
3
+ "version": "7.1.15-dev.8",
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",
@@ -53,7 +53,7 @@
53
53
  "@mikro-orm/core": "^7.1.14"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.1.15-dev.7"
56
+ "@mikro-orm/core": "7.1.15-dev.8"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"