@mikro-orm/core 6.4.17-dev.57 → 6.4.17-dev.59

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.
@@ -2,18 +2,32 @@ import type { AnyString, Constructor, Dictionary, EntityClass, ObjectQuery } fro
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
4
  export type EntityOptions<T, E = T extends EntityClass<infer P> ? P : T> = {
5
+ /** Override default collection/table name. Alias for `collection`. */
5
6
  tableName?: string;
7
+ /** Sets the schema name. */
6
8
  schema?: string;
9
+ /** Override default collection/table name. Alias for `tableName`. */
7
10
  collection?: string;
11
+ /** For {@doclink inheritance-mapping#single-table-inheritance | Single Table Inheritance}. */
8
12
  discriminatorColumn?: (T extends EntityClass<infer P> ? keyof P : string) | AnyString;
13
+ /** For {@doclink inheritance-mapping#single-table-inheritance | Single Table Inheritance}. */
9
14
  discriminatorMap?: Dictionary<string>;
15
+ /** For {@doclink inheritance-mapping#single-table-inheritance | Single Table Inheritance}. */
10
16
  discriminatorValue?: number | string;
17
+ /** Enforce use of constructor when creating managed entity instances. */
11
18
  forceConstructor?: boolean;
19
+ /** Specify comment to table. (SQL only) */
12
20
  comment?: string;
21
+ /** Marks entity as abstract, such entities are inlined during discovery. */
13
22
  abstract?: boolean;
23
+ /** Disables change tracking - such entities are ignored during flush. */
14
24
  readonly?: boolean;
25
+ /** Marks entity as {@doclink virtual-entities | virtual}. This is set automatically when you use `expression` option. */
15
26
  virtual?: boolean;
27
+ /** Used to make ORM aware of externally defined triggers. This is needed for MS SQL Server multi inserts, ignored in other dialects. */
16
28
  hasTriggers?: boolean;
29
+ /** SQL query that maps to a {@doclink virtual-entities | virtual entity}. */
17
30
  expression?: string | ((em: any, where: ObjectQuery<E>, options: FindOptions<E, any, any, any>) => object);
31
+ /** Set {@doclink repositories#custom-repository | custom repository class}. */
18
32
  repository?: () => Constructor;
19
33
  };
@@ -457,7 +457,7 @@ declare const propertyBuilders: {
457
457
  mediumint: () => PropertyOptionsBuilder<number>;
458
458
  float: () => PropertyOptionsBuilder<number>;
459
459
  double: () => PropertyOptionsBuilder<NonNullable<string | number>>;
460
- boolean: () => PropertyOptionsBuilder<number>;
460
+ boolean: () => PropertyOptionsBuilder<NonNullable<boolean | null | undefined>>;
461
461
  decimal: () => PropertyOptionsBuilder<NonNullable<string | number>>;
462
462
  character: () => PropertyOptionsBuilder<string>;
463
463
  string: () => PropertyOptionsBuilder<string>;
@@ -495,7 +495,7 @@ export declare namespace defineEntity {
495
495
  mediumint: () => PropertyOptionsBuilder<number>;
496
496
  float: () => PropertyOptionsBuilder<number>;
497
497
  double: () => PropertyOptionsBuilder<NonNullable<string | number>>;
498
- boolean: () => PropertyOptionsBuilder<number>;
498
+ boolean: () => PropertyOptionsBuilder<NonNullable<boolean | null | undefined>>;
499
499
  decimal: () => PropertyOptionsBuilder<NonNullable<string | number>>;
500
500
  character: () => PropertyOptionsBuilder<string>;
501
501
  string: () => PropertyOptionsBuilder<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/core",
3
- "version": "6.4.17-dev.57",
3
+ "version": "6.4.17-dev.59",
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.17-dev.57",
67
+ "mikro-orm": "6.4.17-dev.59",
68
68
  "reflect-metadata": "0.2.2"
69
69
  }
70
70
  }
@@ -1,7 +1,7 @@
1
1
  import { Type } from './Type';
2
2
  import type { Platform } from '../platforms';
3
3
  import type { EntityProperty } from '../typings';
4
- export declare class BooleanType extends Type<number | null | undefined, number | null | undefined> {
4
+ export declare class BooleanType extends Type<boolean | null | undefined, boolean | null | undefined> {
5
5
  getColumnType(prop: EntityProperty, platform: Platform): string;
6
6
  compareAsType(): string;
7
7
  ensureComparable(): boolean;