@mikro-orm/knex 5.8.9-dev.1 → 5.8.9

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.
@@ -825,7 +825,7 @@ class AbstractSqlDriver extends core_1.DatabaseDriver {
825
825
  buildFields(meta, populate, joinedProps, qb, fields) {
826
826
  const lazyProps = meta.props.filter(prop => prop.lazy && !populate.some(p => p.field === prop.name || p.all));
827
827
  const hasLazyFormulas = meta.props.some(p => p.lazy && p.formula);
828
- const requiresSQLConversion = meta.props.some(p => p.customType?.convertToJSValueSQL);
828
+ const requiresSQLConversion = meta.props.some(p => p.customType?.convertToJSValueSQL && p.persist !== false);
829
829
  const hasExplicitFields = !!fields;
830
830
  const ret = [];
831
831
  if (joinedProps.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "5.8.9-dev.1",
3
+ "version": "5.8.9",
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.8"
66
+ "@mikro-orm/core": "^5.8.9"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "5.8.9-dev.1",
70
- "@mikro-orm/entity-generator": "5.8.9-dev.1",
71
- "@mikro-orm/migrations": "5.8.9-dev.1",
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": "*",
@@ -733,7 +733,7 @@ class QueryBuilder {
733
733
  });
734
734
  const meta = this.mainAlias.metadata;
735
735
  /* istanbul ignore next */
736
- const requiresSQLConversion = meta?.props.filter(p => p.hasConvertToJSValueSQL) ?? [];
736
+ const requiresSQLConversion = meta?.props.filter(p => p.hasConvertToJSValueSQL && p.persist !== false) ?? [];
737
737
  if (this.flags.has(core_1.QueryFlag.CONVERT_CUSTOM_TYPES) && (fields.includes('*') || fields.includes(`${this.mainAlias.aliasName}.*`)) && requiresSQLConversion.length > 0) {
738
738
  requiresSQLConversion.forEach(p => ret.push(this.helper.mapper(p.name, this.type)));
739
739
  }