@mikro-orm/knex 6.3.12-dev.2 → 6.3.12-dev.4

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.3.12-dev.2",
3
+ "version": "6.3.12-dev.4",
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.3.11"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.3.12-dev.2",
69
+ "@mikro-orm/core": "6.3.12-dev.4",
70
70
  "better-sqlite3": "*",
71
71
  "libsql": "*",
72
72
  "mariadb": "*"
@@ -663,10 +663,11 @@ class QueryBuilder {
663
663
  else {
664
664
  mapped = [this.driver.mapResult(res, meta, joinedProps, this)];
665
665
  }
666
- await this.em?.storeCache(this._cache, cached, mapped);
667
666
  if (method === 'get') {
667
+ await this.em?.storeCache(this._cache, cached, mapped[0]);
668
668
  return mapped[0];
669
669
  }
670
+ await this.em?.storeCache(this._cache, cached, mapped);
670
671
  return mapped;
671
672
  }
672
673
  /**