@mikro-orm/core 6.6.3-dev.1 → 6.6.3-dev.2

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.
@@ -6,7 +6,7 @@ import type { ManyToOneOptions } from '../decorators/ManyToOne';
6
6
  import type { OneToManyOptions } from '../decorators/OneToMany';
7
7
  import type { OneToOneOptions } from '../decorators/OneToOne';
8
8
  import type { ManyToManyOptions } from '../decorators/ManyToMany';
9
- import type { AnyString, GeneratedColumnCallback, Constructor, CheckCallback, FilterQuery, EntityName, Dictionary, EntityMetadata, PrimaryKeyProp, Hidden, Opt, Primary, EntityClass, Ref } from '../typings';
9
+ import type { AnyString, GeneratedColumnCallback, Constructor, CheckCallback, FilterQuery, EntityName, Dictionary, EntityMetadata, PrimaryKeyProp, Hidden, Opt, Primary, EntityClass, Ref, IndexCallback } from '../typings';
10
10
  import type { ScalarReference } from './Reference';
11
11
  import type { SerializeOptions } from '../serialization/EntitySerializer';
12
12
  import type { Cascade, DeferMode, EventType, LoadStrategy, QueryOrderMap } from '../enums';
@@ -416,13 +416,32 @@ declare const propertyBuilders: {
416
416
  interval: () => UniversalPropertyOptionsBuilder<string, EmptyOptions, IncludeKeysForProperty>;
417
417
  unknown: () => UniversalPropertyOptionsBuilder<{}, EmptyOptions, IncludeKeysForProperty>;
418
418
  };
419
- export declare function defineEntity<Properties extends Record<string, any>, const PK extends (keyof Properties)[] | undefined = undefined, Base = never>(meta: Omit<Partial<EntityMetadata<InferEntityFromProperties<Properties, PK>>>, 'properties' | 'extends' | 'primaryKeys' | 'hooks'> & {
419
+ export interface EntityMetadataWithProperties<TProperties extends Record<string, any>, TPK extends (keyof TProperties)[] | undefined = undefined, TBase = never> extends Omit<Partial<EntityMetadata<InferEntityFromProperties<TProperties, TPK>>>, 'properties' | 'extends' | 'primaryKeys' | 'hooks' | 'discriminatorColumn' | 'versionProperty' | 'concurrencyCheckKeys' | 'serializedPrimaryKey' | 'indexes' | 'uniques'> {
420
420
  name: string;
421
- extends?: EntityName<Base>;
422
- properties: Properties | ((properties: typeof propertyBuilders) => Properties);
423
- primaryKeys?: PK & InferPrimaryKey<Properties>[];
424
- hooks?: DefineEntityHooks<InferEntityFromProperties<Properties, PK>>;
425
- }): EntitySchema<InferEntityFromProperties<Properties, PK>, Base>;
421
+ extends?: EntityName<TBase>;
422
+ properties: TProperties | ((properties: typeof propertyBuilders) => TProperties);
423
+ primaryKeys?: TPK & InferPrimaryKey<TProperties>[];
424
+ hooks?: DefineEntityHooks<InferEntityFromProperties<TProperties, TPK>>;
425
+ discriminatorColumn?: keyof TProperties;
426
+ versionProperty?: keyof TProperties;
427
+ concurrencyCheckKeys?: Set<keyof TProperties>;
428
+ serializedPrimaryKey?: keyof TProperties;
429
+ indexes?: {
430
+ properties?: keyof TProperties | (keyof TProperties)[];
431
+ name?: string;
432
+ type?: string;
433
+ options?: Dictionary;
434
+ expression?: string | IndexCallback<InferEntityFromProperties<TProperties, TPK>>;
435
+ }[];
436
+ uniques?: {
437
+ properties?: keyof TProperties | (keyof TProperties)[];
438
+ name?: string;
439
+ options?: Dictionary;
440
+ expression?: string | IndexCallback<InferEntityFromProperties<TProperties, TPK>>;
441
+ deferMode?: DeferMode | `${DeferMode}`;
442
+ }[];
443
+ }
444
+ export declare function defineEntity<TProperties extends Record<string, any>, const TPK extends (keyof TProperties)[] | undefined = undefined, TBase = never>(meta: EntityMetadataWithProperties<TProperties, TPK, TBase>): EntitySchema<InferEntityFromProperties<TProperties, TPK>, TBase>;
426
445
  export declare function defineEntity<Entity = any, Base = never>(meta: Omit<Partial<EntityMetadata<Entity>>, 'properties' | 'extends'> & {
427
446
  class: EntityClass<Entity>;
428
447
  extends?: EntityName<Base>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.6.3-dev.1",
3
+ "version": "6.6.3-dev.2",
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.2",
66
66
  "globby": "11.1.0",
67
- "mikro-orm": "6.6.3-dev.1",
67
+ "mikro-orm": "6.6.3-dev.2",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }