@mikro-orm/knex 5.8.5-dev.5 → 5.8.5

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.
@@ -166,6 +166,17 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
166
166
  }
167
167
  return;
168
168
  }
169
+ meta2.props
170
+ .filter(prop => prop.persist === false)
171
+ .forEach(prop => {
172
+ if (prop.fieldNames.length > 1) { // composite keys
173
+ relationPojo[prop.name] = prop.fieldNames.map(name => root[`${relationAlias}__${name}`]);
174
+ }
175
+ else {
176
+ const alias = `${relationAlias}__${prop.fieldNames[0]}`;
177
+ relationPojo[prop.name] = root[alias];
178
+ }
179
+ });
169
180
  meta2.props
170
181
  .filter(prop => this.platform.shouldHaveColumn(prop, p.children || []))
171
182
  .forEach(prop => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "5.8.5-dev.5",
3
+ "version": "5.8.5",
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",
@@ -63,12 +63,12 @@
63
63
  "sqlstring": "2.3.3"
64
64
  },
65
65
  "devDependencies": {
66
- "@mikro-orm/core": "5.8.4"
66
+ "@mikro-orm/core": "^5.8.5"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "5.8.5-dev.5",
70
- "@mikro-orm/entity-generator": "5.8.5-dev.5",
71
- "@mikro-orm/migrations": "5.8.5-dev.5",
69
+ "@mikro-orm/core": "^5.0.0",
70
+ "@mikro-orm/entity-generator": "^5.0.0",
71
+ "@mikro-orm/migrations": "^5.0.0",
72
72
  "better-sqlite3": "*",
73
73
  "mssql": "*",
74
74
  "mysql": "*",