@mikro-orm/core 6.4.9-dev.0 → 6.4.9-dev.1

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.
@@ -1,7 +1,7 @@
1
- import type { AnyString, Constructor, Dictionary, EntityClass, FilterQuery } from '../typings';
1
+ import type { AnyString, Constructor, Dictionary, EntityClass, ObjectQuery } from '../typings';
2
2
  import type { FindOptions } from '../drivers/IDatabaseDriver';
3
3
  export declare function Entity<T extends EntityClass<unknown>>(options?: EntityOptions<T>): (target: T) => void;
4
- export type EntityOptions<T> = {
4
+ export type EntityOptions<T, E = T extends EntityClass<infer P> ? P : T> = {
5
5
  tableName?: string;
6
6
  schema?: string;
7
7
  collection?: string;
@@ -13,6 +13,6 @@ export type EntityOptions<T> = {
13
13
  abstract?: boolean;
14
14
  readonly?: boolean;
15
15
  virtual?: boolean;
16
- expression?: string | ((em: any, where: FilterQuery<T>, options: FindOptions<T, any, any, any>) => object);
16
+ expression?: string | ((em: any, where: ObjectQuery<E>, options: FindOptions<E, any, any, any>) => object);
17
17
  repository?: () => Constructor;
18
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.4.9-dev.0",
3
+ "version": "6.4.9-dev.1",
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",
@@ -64,7 +64,7 @@
64
64
  "esprima": "4.0.1",
65
65
  "fs-extra": "11.3.0",
66
66
  "globby": "11.1.0",
67
- "mikro-orm": "6.4.9-dev.0",
67
+ "mikro-orm": "6.4.9-dev.1",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }
package/typings.d.ts CHANGED
@@ -409,7 +409,7 @@ export interface EntityMetadata<T = any> {
409
409
  schema?: string;
410
410
  pivotTable?: boolean;
411
411
  virtual?: boolean;
412
- expression?: string | ((em: any, where: FilterQuery<T>, options: FindOptions<T, any, any, any>) => MaybePromise<object | string>);
412
+ expression?: string | ((em: any, where: ObjectQuery<T>, options: FindOptions<T, any, any, any>) => MaybePromise<object | string>);
413
413
  discriminatorColumn?: EntityKey<T> | AnyString;
414
414
  discriminatorValue?: number | string;
415
415
  discriminatorMap?: Dictionary<string>;