@mikro-orm/knex 6.5.9-dev.5 → 6.5.9-dev.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.5.9-dev.5",
3
+ "version": "6.5.9-dev.7",
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",
@@ -66,7 +66,7 @@
66
66
  "@mikro-orm/core": "^6.5.8"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.5.9-dev.5",
69
+ "@mikro-orm/core": "6.5.9-dev.7",
70
70
  "better-sqlite3": "*",
71
71
  "libsql": "*",
72
72
  "mariadb": "*"
@@ -233,7 +233,7 @@ class ObjectCriteriaNode extends CriteriaNode_1.CriteriaNode {
233
233
  qb._fields = prev;
234
234
  }
235
235
  }
236
- if (!options || options.type !== 'orderBy') {
236
+ if (options?.type !== 'orderBy') {
237
237
  qb.scheduleFilterCheck(path);
238
238
  }
239
239
  return nestedAlias;
@@ -79,7 +79,7 @@ class QueryBuilderHelper {
79
79
  if (prop?.name === a && prop.embeddedProps[f]) {
80
80
  return this.alias + '.' + prop.fieldNames[fkIdx];
81
81
  }
82
- const noPrefix = prop && prop.persist === false;
82
+ const noPrefix = prop?.persist === false;
83
83
  if (prop?.fieldNameRaw) {
84
84
  return this.knex.raw(this.prefix(field, isTableNameAliasRequired));
85
85
  }
@@ -557,7 +557,7 @@ class QueryBuilderHelper {
557
557
  let [alias, field] = this.splitField(f, true);
558
558
  alias = populate[alias] || alias;
559
559
  const prop = this.getProperty(field, alias);
560
- const noPrefix = (prop && prop.persist === false && !prop.formula && !prop.embedded) || core_1.RawQueryFragment.isKnownFragment(f);
560
+ const noPrefix = (prop?.persist === false && !prop.formula && !prop.embedded) || core_1.RawQueryFragment.isKnownFragment(f);
561
561
  const column = this.mapper(noPrefix ? field : `${alias}.${field}`, type, undefined, null);
562
562
  /* istanbul ignore next */
563
563
  const rawColumn = core_1.Utils.isString(column) ? column.split('.').map(e => this.knex.ref(e)).join('.') : column;