@mikro-orm/sql 7.0.3-dev.13 → 7.0.3-dev.14

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.
@@ -1521,13 +1521,10 @@ export class AbstractSqlDriver extends DatabaseDriver {
1521
1521
  childAliases[childMeta.className] = childAlias;
1522
1522
  qb.addPropertyJoin(childMeta.tptInverseProp, baseAlias, childAlias, JoinType.leftJoin, `[tpt]${meta.className}`);
1523
1523
  // Add fields from this child (only ownProps, skip PKs)
1524
- for (const prop of childMeta.ownProps.filter(p => !p.primary && this.platform.shouldHaveColumn(p, []))) {
1525
- for (const fieldName of prop.fieldNames) {
1526
- const field = `${childAlias}.${fieldName}`;
1527
- const fieldAlias = `${childAlias}__${fieldName}`;
1528
- fields.push(raw(`${this.platform.quoteIdentifier(field)} as ${this.platform.quoteIdentifier(fieldAlias)}`));
1529
- }
1530
- }
1524
+ const schema = childMeta.schema === '*' ? '*' : this.getSchemaName(childMeta);
1525
+ childMeta
1526
+ .ownProps.filter(p => !p.primary && this.platform.shouldHaveColumn(p, []))
1527
+ .forEach(prop => fields.push(...this.mapPropToFieldNames(qb, prop, childAlias, childMeta, schema)));
1531
1528
  }
1532
1529
  // Add computed discriminator (descendants already sorted by depth)
1533
1530
  if (meta.root.tptDiscriminatorColumn) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/sql",
3
- "version": "7.0.3-dev.13",
3
+ "version": "7.0.3-dev.14",
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.0.2"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.0.3-dev.13"
56
+ "@mikro-orm/core": "7.0.3-dev.14"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"