@mikro-orm/core 7.2.11-dev.4 → 7.2.11-dev.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "7.2.11-dev.4",
3
+ "version": "7.2.11-dev.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
  "keywords": [
6
6
  "data-mapper",
@@ -249,7 +249,7 @@ export class UnitOfWork {
249
249
  /** Attempts to extract a primary key from the where condition and look up the entity in the identity map. */
250
250
  tryGetById(entityName, where, schema, strict = true, convertCustomTypes) {
251
251
  const pk = Utils.extractPK(where, this.#metadata.find(entityName), strict);
252
- if (!pk) {
252
+ if (pk == null) {
253
253
  return null;
254
254
  }
255
255
  return this.getById(entityName, pk, schema, convertCustomTypes);
package/utils/Utils.js CHANGED
@@ -153,7 +153,7 @@ export function parseJsonSafe(value) {
153
153
  /** Collection of general-purpose utility methods used throughout the ORM. */
154
154
  export class Utils {
155
155
  static PK_SEPARATOR = '~~~';
156
- static #ORM_VERSION = '7.2.11-dev.4';
156
+ static #ORM_VERSION = '7.2.11-dev.5';
157
157
  /** Default session variable name backing an RLS filter argument (`current_setting('mikro.<filter>.<arg>')`). */
158
158
  static getRlsSettingName(filterName, argName) {
159
159
  return `mikro.${filterName}.${argName}`;