@mikro-orm/better-sqlite 6.0.0-dev.32 → 6.0.0-dev.320

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,8 +1,6 @@
1
- import type { Knex } from '@mikro-orm/knex';
2
- import { AbstractSqlConnection } from '@mikro-orm/knex';
1
+ import { AbstractSqlConnection, type Knex } from '@mikro-orm/knex';
3
2
  export declare class BetterSqliteConnection extends AbstractSqlConnection {
4
- static readonly RUN_QUERY_RE: RegExp;
5
- static readonly RUN_QUERY_RETURNING: RegExp;
3
+ createKnex(): void;
6
4
  connect(): Promise<void>;
7
5
  getDefaultClientUrl(): string;
8
6
  getClientUrl(): string;
@@ -13,5 +11,6 @@ export declare class BetterSqliteConnection extends AbstractSqlConnection {
13
11
  * monkey patch knex' BetterSqlite Dialect so it returns inserted id when doing raw insert query
14
12
  */
15
13
  private getPatchedDialect;
14
+ private isRunQuery;
16
15
  private getCallMethod;
17
16
  }
@@ -6,10 +6,14 @@ const path_1 = require("path");
6
6
  const knex_1 = require("@mikro-orm/knex");
7
7
  const core_1 = require("@mikro-orm/core");
8
8
  class BetterSqliteConnection extends knex_1.AbstractSqlConnection {
9
- async connect() {
10
- await (0, fs_extra_1.ensureDir)((0, path_1.dirname)(this.config.get('dbName')));
9
+ createKnex() {
11
10
  this.getPatchedDialect();
12
11
  this.client = this.createKnexClient('better-sqlite3');
12
+ this.connected = true;
13
+ }
14
+ async connect() {
15
+ this.createKnex();
16
+ await (0, fs_extra_1.ensureDir)((0, path_1.dirname)(this.config.get('dbName')));
13
17
  await this.client.raw('pragma foreign_keys = on');
14
18
  }
15
19
  getDefaultClientUrl() {
@@ -24,7 +28,7 @@ class BetterSqliteConnection extends knex_1.AbstractSqlConnection {
24
28
  await this.client.client.releaseConnection(conn);
25
29
  }
26
30
  getKnexOptions(type) {
27
- return core_1.Utils.merge({
31
+ return core_1.Utils.mergeConfig({
28
32
  client: type,
29
33
  connection: {
30
34
  filename: this.config.get('dbName'),
@@ -64,7 +68,7 @@ class BetterSqliteConnection extends knex_1.AbstractSqlConnection {
64
68
  const processResponse = Sqlite3Dialect.prototype.processResponse;
65
69
  Sqlite3Dialect.prototype.__patched = true;
66
70
  Sqlite3Dialect.prototype.processResponse = (obj, runner) => {
67
- if (obj.method === 'raw' && obj.sql.trim().match(BetterSqliteConnection.RUN_QUERY_RE)) {
71
+ if (obj.method === 'raw' && this.isRunQuery(obj.sql)) {
68
72
  return obj.response ?? obj.context;
69
73
  }
70
74
  return processResponse(obj, runner);
@@ -126,12 +130,25 @@ class BetterSqliteConnection extends knex_1.AbstractSqlConnection {
126
130
  };
127
131
  return Sqlite3Dialect;
128
132
  }
129
- getCallMethod(obj) {
130
- if (obj.method === 'raw' && obj.sql.trim().match(BetterSqliteConnection.RUN_QUERY_RETURNING)) {
131
- return 'all';
133
+ isRunQuery(query) {
134
+ query = query.trim().toLowerCase();
135
+ if ((query.startsWith('insert into') || query.startsWith('update ')) && query.includes(' returning ')) {
136
+ return false;
132
137
  }
133
- if (obj.method === 'raw' && obj.sql.trim().match(BetterSqliteConnection.RUN_QUERY_RE)) {
134
- return 'run';
138
+ return query.startsWith('insert into') ||
139
+ query.startsWith('update') ||
140
+ query.startsWith('delete') ||
141
+ query.startsWith('truncate');
142
+ }
143
+ getCallMethod(obj) {
144
+ if (obj.method === 'raw') {
145
+ const query = obj.sql.trim().toLowerCase();
146
+ if ((query.startsWith('insert into') || query.startsWith('update ')) && query.includes(' returning ')) {
147
+ return 'all';
148
+ }
149
+ if (this.isRunQuery(query)) {
150
+ return 'run';
151
+ }
135
152
  }
136
153
  /* istanbul ignore next */
137
154
  switch (obj.method) {
@@ -147,5 +164,3 @@ class BetterSqliteConnection extends knex_1.AbstractSqlConnection {
147
164
  }
148
165
  }
149
166
  exports.BetterSqliteConnection = BetterSqliteConnection;
150
- BetterSqliteConnection.RUN_QUERY_RE = /^insert into|^update|^delete|^truncate/;
151
- BetterSqliteConnection.RUN_QUERY_RETURNING = /^insert into .* returning .*/;
@@ -1,5 +1,4 @@
1
- import type { Dictionary, DriverException } from '@mikro-orm/core';
2
- import { ExceptionConverter } from '@mikro-orm/core';
1
+ import { ExceptionConverter, type Dictionary, type DriverException } from '@mikro-orm/core';
3
2
  export declare class BetterSqliteExceptionConverter extends ExceptionConverter {
4
3
  /**
5
4
  * @inheritDoc
@@ -1,15 +1,19 @@
1
- import { MikroORM } from '@mikro-orm/core';
2
- import type { Options, IDatabaseDriver } from '@mikro-orm/core';
1
+ import { MikroORM, type Options, type IDatabaseDriver, type EntityManager, type EntityManagerType } from '@mikro-orm/core';
3
2
  import { BetterSqliteDriver } from './BetterSqliteDriver';
3
+ import type { SqlEntityManager } from '@mikro-orm/knex';
4
4
  /**
5
5
  * @inheritDoc
6
6
  */
7
- export declare class BetterSqliteMikroORM extends MikroORM<BetterSqliteDriver> {
7
+ export declare class BetterSqliteMikroORM<EM extends EntityManager = SqlEntityManager> extends MikroORM<BetterSqliteDriver, EM> {
8
8
  private static DRIVER;
9
9
  /**
10
10
  * @inheritDoc
11
11
  */
12
- static init<D extends IDatabaseDriver = BetterSqliteDriver>(options?: Options<D>): Promise<MikroORM<D>>;
12
+ static init<D extends IDatabaseDriver = BetterSqliteDriver, EM extends EntityManager = D[typeof EntityManagerType] & EntityManager>(options?: Options<D, EM>): Promise<MikroORM<D, EM>>;
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static initSync<D extends IDatabaseDriver = BetterSqliteDriver, EM extends EntityManager = D[typeof EntityManagerType] & EntityManager>(options: Options<D, EM>): MikroORM<D, EM>;
13
17
  }
14
18
  export type BetterSqliteOptions = Options<BetterSqliteDriver>;
15
- export declare function defineBetterSqliteConfig(options: BetterSqliteOptions): Options<BetterSqliteDriver>;
19
+ export declare function defineBetterSqliteConfig(options: BetterSqliteOptions): Options<BetterSqliteDriver, EntityManager<IDatabaseDriver<import("@mikro-orm/core").Connection>>>;
@@ -7,15 +7,21 @@ const BetterSqliteDriver_1 = require("./BetterSqliteDriver");
7
7
  * @inheritDoc
8
8
  */
9
9
  class BetterSqliteMikroORM extends core_1.MikroORM {
10
+ static DRIVER = BetterSqliteDriver_1.BetterSqliteDriver;
10
11
  /**
11
12
  * @inheritDoc
12
13
  */
13
14
  static async init(options) {
14
15
  return super.init(options);
15
16
  }
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static initSync(options) {
21
+ return super.initSync(options);
22
+ }
16
23
  }
17
24
  exports.BetterSqliteMikroORM = BetterSqliteMikroORM;
18
- BetterSqliteMikroORM.DRIVER = BetterSqliteDriver_1.BetterSqliteDriver;
19
25
  /* istanbul ignore next */
20
26
  function defineBetterSqliteConfig(options) {
21
27
  return (0, core_1.defineConfig)({ driver: BetterSqliteDriver_1.BetterSqliteDriver, ...options });
@@ -1,4 +1,4 @@
1
- import type { EntityProperty } from '@mikro-orm/core';
1
+ import { type EntityProperty } from '@mikro-orm/core';
2
2
  import { AbstractSqlPlatform } from '@mikro-orm/knex';
3
3
  import { BetterSqliteSchemaHelper } from './BetterSqliteSchemaHelper';
4
4
  import { BetterSqliteExceptionConverter } from './BetterSqliteExceptionConverter';
@@ -49,7 +49,6 @@ export declare class BetterSqlitePlatform extends AbstractSqlPlatform {
49
49
  processDateProperty(value: unknown): string | number | Date;
50
50
  quoteVersionValue(value: Date | number, prop: EntityProperty): Date | string | number;
51
51
  quoteValue(value: any): string;
52
- getSearchJsonPropertyKey(path: string[], type: string, aliased: boolean): string;
53
52
  getIndexName(tableName: string, columns: string[], type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence'): string;
54
53
  getDefaultPrimaryName(tableName: string, columns: string[]): string;
55
54
  supportsDownMigrations(): boolean;
@@ -8,11 +8,8 @@ const knex_1 = require("@mikro-orm/knex");
8
8
  const BetterSqliteSchemaHelper_1 = require("./BetterSqliteSchemaHelper");
9
9
  const BetterSqliteExceptionConverter_1 = require("./BetterSqliteExceptionConverter");
10
10
  class BetterSqlitePlatform extends knex_1.AbstractSqlPlatform {
11
- constructor() {
12
- super(...arguments);
13
- this.schemaHelper = new BetterSqliteSchemaHelper_1.BetterSqliteSchemaHelper(this);
14
- this.exceptionConverter = new BetterSqliteExceptionConverter_1.BetterSqliteExceptionConverter();
15
- }
11
+ schemaHelper = new BetterSqliteSchemaHelper_1.BetterSqliteSchemaHelper(this);
12
+ exceptionConverter = new BetterSqliteExceptionConverter_1.BetterSqliteExceptionConverter();
16
13
  usesDefaultKeyword() {
17
14
  return false;
18
15
  }
@@ -68,7 +65,7 @@ class BetterSqlitePlatform extends knex_1.AbstractSqlPlatform {
68
65
  return value;
69
66
  }
70
67
  quoteVersionValue(value, prop) {
71
- if (prop.type.toLowerCase() === 'date') {
68
+ if (prop.runtimeType === 'Date') {
72
69
  return (0, sqlstring_sqlite_1.escape)(value, true, this.timezone).replace(/^'|\.\d{3}'$/g, '');
73
70
  }
74
71
  return value;
@@ -83,13 +80,6 @@ class BetterSqlitePlatform extends knex_1.AbstractSqlPlatform {
83
80
  }
84
81
  return (0, sqlstring_sqlite_1.escape)(value, true, this.timezone);
85
82
  }
86
- getSearchJsonPropertyKey(path, type, aliased) {
87
- const [a, ...b] = path;
88
- if (aliased) {
89
- return (0, core_1.expr)(alias => `json_extract(${this.quoteIdentifier(`${alias}.${a}`)}, '$.${b.join('.')}')`);
90
- }
91
- return `json_extract(${this.quoteIdentifier(a)}, '$.${b.join('.')}')`;
92
- }
93
83
  getIndexName(tableName, columns, type) {
94
84
  if (type === 'primary') {
95
85
  return this.getDefaultPrimaryName(tableName, columns);
@@ -1,18 +1,20 @@
1
1
  import type { Connection, Dictionary } from '@mikro-orm/core';
2
- import type { AbstractSqlConnection, IndexDef, CheckDef } from '@mikro-orm/knex';
3
- import { SchemaHelper } from '@mikro-orm/knex';
2
+ import { SchemaHelper, type AbstractSqlConnection, type IndexDef, type CheckDef } from '@mikro-orm/knex';
4
3
  export declare class BetterSqliteSchemaHelper extends SchemaHelper {
5
4
  disableForeignKeysSQL(): string;
6
5
  enableForeignKeysSQL(): string;
7
6
  supportsSchemaConstraints(): boolean;
8
7
  getListTablesSQL(): string;
8
+ private parseTableDefinition;
9
9
  getColumns(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<any[]>;
10
10
  getEnumDefinitions(connection: AbstractSqlConnection, checks: CheckDef[], tableName: string, schemaName: string): Promise<Dictionary<string[]>>;
11
- getPrimaryKeys(connection: AbstractSqlConnection, indexes: IndexDef[] | undefined, tableName: string, schemaName?: string): Promise<string[]>;
11
+ getPrimaryKeys(connection: AbstractSqlConnection, indexes: IndexDef[], tableName: string, schemaName?: string): Promise<string[]>;
12
12
  getIndexes(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<IndexDef[]>;
13
13
  getChecks(connection: AbstractSqlConnection, tableName: string, schemaName?: string): Promise<CheckDef[]>;
14
14
  getForeignKeysSQL(tableName: string): string;
15
15
  mapForeignKeys(fks: any[], tableName: string): Dictionary;
16
+ getManagementDbName(): string;
17
+ getCreateDatabaseSQL(name: string): string;
16
18
  databaseExists(connection: Connection, name: string): Promise<boolean>;
17
19
  /**
18
20
  * Implicit indexes will be ignored when diffing
@@ -16,15 +16,44 @@ class BetterSqliteSchemaHelper extends knex_1.SchemaHelper {
16
16
  return `select name as table_name from sqlite_master where type = 'table' and name != 'sqlite_sequence' and name != 'geometry_columns' and name != 'spatial_ref_sys' `
17
17
  + `union all select name as table_name from sqlite_temp_master where type = 'table' order by name`;
18
18
  }
19
+ parseTableDefinition(sql, cols) {
20
+ const columns = {};
21
+ // extract all columns definitions
22
+ let columnsDef = sql.replaceAll('\n', '').match(new RegExp(`create table [\`"']?.*?[\`"']? \\((.*)\\)`, 'i'))?.[1];
23
+ /* istanbul ignore else */
24
+ if (columnsDef) {
25
+ for (let i = cols.length - 1; i >= 0; i--) {
26
+ const col = cols[i];
27
+ const re = ` *, *[\`"']?${col.name}[\`"']? (.*)`;
28
+ const columnDef = columnsDef.match(new RegExp(re, 'i'));
29
+ /* istanbul ignore else */
30
+ if (columnDef) {
31
+ columns[col.name] = { name: col.name, definition: columnDef[1] };
32
+ columnsDef = columnsDef.substring(0, columnDef.index);
33
+ }
34
+ }
35
+ }
36
+ return columns;
37
+ }
19
38
  async getColumns(connection, tableName, schemaName) {
20
- const columns = await connection.execute(`pragma table_info('${tableName}')`);
39
+ const columns = await connection.execute(`pragma table_xinfo('${tableName}')`);
21
40
  const sql = `select sql from sqlite_master where type = ? and name = ?`;
22
41
  const tableDefinition = await connection.execute(sql, ['table', tableName], 'get');
23
42
  const composite = columns.reduce((count, col) => count + (col.pk ? 1 : 0), 0) > 1;
24
43
  // there can be only one, so naive check like this should be enough
25
44
  const hasAutoincrement = tableDefinition.sql.toLowerCase().includes('autoincrement');
45
+ const columnDefinitions = this.parseTableDefinition(tableDefinition.sql, columns);
26
46
  return columns.map(col => {
27
47
  const mappedType = connection.getPlatform().getMappedType(col.type);
48
+ let generated;
49
+ if (col.hidden > 1) {
50
+ const storage = col.hidden === 2 ? 'virtual' : 'stored';
51
+ const re = `(generated always)? as \\((.*)\\)( ${storage})?$`;
52
+ const match = columnDefinitions[col.name].definition.match(re);
53
+ if (match) {
54
+ generated = `${match[2]} ${storage}`;
55
+ }
56
+ }
28
57
  return {
29
58
  name: col.name,
30
59
  type: col.type,
@@ -34,6 +63,7 @@ class BetterSqliteSchemaHelper extends knex_1.SchemaHelper {
34
63
  mappedType,
35
64
  unsigned: false,
36
65
  autoincrement: !composite && col.pk && this.platform.isNumericColumn(mappedType) && hasAutoincrement,
66
+ generated,
37
67
  };
38
68
  });
39
69
  }
@@ -52,7 +82,7 @@ class BetterSqliteSchemaHelper extends knex_1.SchemaHelper {
52
82
  return o;
53
83
  }, {});
54
84
  }
55
- async getPrimaryKeys(connection, indexes = [], tableName, schemaName) {
85
+ async getPrimaryKeys(connection, indexes, tableName, schemaName) {
56
86
  const sql = `pragma table_info(\`${tableName}\`)`;
57
87
  const cols = await connection.execute(sql);
58
88
  return cols.filter(col => !!col.pk).map(col => col.name);
@@ -66,6 +96,7 @@ class BetterSqliteSchemaHelper extends knex_1.SchemaHelper {
66
96
  ret.push({
67
97
  columnNames: [col.name],
68
98
  keyName: 'primary',
99
+ constraint: true,
69
100
  unique: true,
70
101
  primary: true,
71
102
  });
@@ -76,6 +107,7 @@ class BetterSqliteSchemaHelper extends knex_1.SchemaHelper {
76
107
  columnNames: [row.name],
77
108
  keyName: index.name,
78
109
  unique: !!index.unique,
110
+ constraint: !!index.unique,
79
111
  primary: false,
80
112
  })));
81
113
  }
@@ -104,8 +136,15 @@ class BetterSqliteSchemaHelper extends knex_1.SchemaHelper {
104
136
  return ret;
105
137
  }, {});
106
138
  }
139
+ getManagementDbName() {
140
+ return '';
141
+ }
142
+ getCreateDatabaseSQL(name) {
143
+ return '';
144
+ }
107
145
  async databaseExists(connection, name) {
108
- return true;
146
+ const tables = await connection.execute(this.getListTablesSQL());
147
+ return tables.length > 0;
109
148
  }
110
149
  /**
111
150
  * Implicit indexes will be ignored when diffing
package/README.md CHANGED
@@ -2,11 +2,9 @@
2
2
  <a href="https://mikro-orm.io"><img src="https://raw.githubusercontent.com/mikro-orm/mikro-orm/master/docs/static/img/logo-readme.svg?sanitize=true" alt="MikroORM" /></a>
3
3
  </h1>
4
4
 
5
- TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-orm.io/docs/unit-of-work/)
6
- and [Identity Map](https://mikro-orm.io/docs/identity-map/) patterns. Supports MongoDB, MySQL,
7
- MariaDB, PostgreSQL and SQLite databases.
5
+ TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-orm.io/docs/unit-of-work/) and [Identity Map](https://mikro-orm.io/docs/identity-map/) patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.
8
6
 
9
- > Heavily inspired by [Doctrine](https://www.doctrine-project.org/) and [Nextras Orm](https://nextras.org/orm/).
7
+ > Heavily inspired by [Doctrine](https://www.doctrine-project.org/) and [Hibernate](https://hibernate.org/).
10
8
 
11
9
  [![NPM version](https://img.shields.io/npm/v/@mikro-orm/core.svg)](https://www.npmjs.com/package/@mikro-orm/core)
12
10
  [![NPM dev version](https://img.shields.io/npm/v/@mikro-orm/core/next.svg)](https://www.npmjs.com/package/@mikro-orm/core)
@@ -31,13 +29,9 @@ So what benefits does it bring to us?
31
29
 
32
30
  ### Implicit Transactions
33
31
 
34
- First and most important implication of having Unit of Work is that it allows handling
35
- transactions automatically.
32
+ First and most important implication of having Unit of Work is that it allows handling transactions automatically.
36
33
 
37
- When you call `em.flush()`, all computed changes are queried inside a database
38
- transaction (if supported by given driver). This means that you can control the boundaries
39
- of transactions simply by calling `em.persistLater()` and once all your changes
40
- are ready, calling `flush()` will run them inside a transaction.
34
+ When you call `em.flush()`, all computed changes are queried inside a database transaction (if supported by given driver). This means that you can control the boundaries of transactions simply by calling `em.persistLater()` and once all your changes are ready, calling `flush()` will run them inside a transaction.
41
35
 
42
36
  > You can also control the transaction boundaries manually via `em.transactional(cb)`.
43
37
 
@@ -55,9 +49,7 @@ await em.flush();
55
49
 
56
50
  ### ChangeSet based persistence
57
51
 
58
- MikroORM allows you to implement your domain/business logic directly in the entities.
59
- To maintain always valid entities, you can use constructors to mark required properties.
60
- Let's define the `User` entity used in previous example:
52
+ MikroORM allows you to implement your domain/business logic directly in the entities. To maintain always valid entities, you can use constructors to mark required properties. Let's define the `User` entity used in previous example:
61
53
 
62
54
  ```typescript
63
55
  @Entity()
@@ -69,10 +61,10 @@ export class User {
69
61
  @Property()
70
62
  name!: string;
71
63
 
72
- @OneToOne()
64
+ @OneToOne(() => Address)
73
65
  address?: Address;
74
66
 
75
- @ManyToMany()
67
+ @ManyToMany(() => Car)
76
68
  cars = new Collection<Car>(this);
77
69
 
78
70
  constructor(name: string) {
@@ -95,7 +87,9 @@ then call `em.flush()`. This will trigger computing of change sets. Only entitie
95
87
  no transaction will be started.
96
88
 
97
89
  ```typescript
98
- const user = await em.findOneOrFail(User, 1, ['cars', 'address']);
90
+ const user = await em.findOneOrFail(User, 1, {
91
+ populate: ['cars', 'address.city'],
92
+ });
99
93
  user.title = 'Mr.';
100
94
  user.address.street = '10 Downing Street'; // address is 1:1 relation of Address entity
101
95
  user.cars.getItems().forEach(car => car.forSale = true); // cars is 1:m collection of Car entities
@@ -110,53 +104,49 @@ await em.flush();
110
104
 
111
105
  ```sql
112
106
  begin;
113
- update user set title = 'Mr.' where id = 1;
114
- update user_address set street = '10 Downing Street' where id = 123;
115
- update car set for_sale = true where id = 1;
116
- update car set for_sale = true where id = 2;
117
- update car set for_sale = true where id = 3;
118
- insert into car (brand, owner) values ('VW', 1);
107
+ update "user" set "title" = 'Mr.' where "id" = 1;
108
+ update "user_address" set "street" = '10 Downing Street' where "id" = 123;
109
+ update "car"
110
+ set "for_sale" = case
111
+ when ("id" = 1) then true
112
+ when ("id" = 2) then true
113
+ when ("id" = 3) then true
114
+ else "for_sale" end
115
+ where "id" in (1, 2, 3)
116
+ insert into "car" ("brand", "owner") values ('VW', 1);
119
117
  commit;
120
118
  ```
121
119
 
122
- ### Only One Instance of Entity
120
+ ### Identity Map
123
121
 
124
- Thanks to Identity Map, you will always have only one instance of given entity in one context.
125
- This allows for some optimizations (skipping loading of already loaded entities), as well as
126
- comparison by identity (`ent1 === ent2`).
122
+ Thanks to Identity Map, you will always have only one instance of given entity in one context. This allows for some optimizations (skipping loading of already loaded entities), as well as comparison by identity (`ent1 === ent2`).
127
123
 
128
124
  ## 📖 Documentation
129
125
 
130
- MikroORM v4 documentation, included in this repo in the root directory, is built with
131
- [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages at https://mikro-orm.io.
132
-
133
- There is also auto-generated [CHANGELOG.md](CHANGELOG.md) file based on commit messages
134
- (via `semantic-release`).
126
+ MikroORM documentation, included in this repo in the root directory, is built with [Docusaurus](https://docusaurus.io) and publicly hosted on GitHub Pages at https://mikro-orm.io.
135
127
 
136
- > You can browse MikroORM v3 docs at [https://mikro-orm.io/docs/3.6/installation](https://mikro-orm.io/docs/3.6/installation).
137
-
138
- > To upgrade to v4, please see the [upgrading guide](https://mikro-orm.io/docs/upgrading-v3-to-v4).
128
+ There is also auto-generated [CHANGELOG.md](CHANGELOG.md) file based on commit messages (via `semantic-release`).
139
129
 
140
130
  ## ✨ Core Features
141
131
 
142
- - [Clean and Simple Entity Definition](https://mikro-orm.io/docs/defining-entities/)
143
- - [Identity Map](https://mikro-orm.io/docs/identity-map/)
144
- - [Entity References](https://mikro-orm.io/docs/entity-references/)
145
- - [Using Entity Constructors](https://mikro-orm.io/docs/using-entity-constructors/)
146
- - [Modelling Relationships](https://mikro-orm.io/docs/relationships/)
147
- - [Collections](https://mikro-orm.io/docs/collections/)
148
- - [Unit of Work](https://mikro-orm.io/docs/unit-of-work/)
149
- - [Transactions](https://mikro-orm.io/docs/transactions/)
150
- - [Cascading persist and remove](https://mikro-orm.io/docs/cascading/)
151
- - [Composite and Foreign Keys as Primary Key](https://mikro-orm.io/docs/composite-keys/)
152
- - [Filters](https://mikro-orm.io/docs/filters/)
153
- - [Using `QueryBuilder`](https://mikro-orm.io/docs/query-builder/)
154
- - [Preloading Deeply Nested Structures via populate](https://mikro-orm.io/docs/nested-populate/)
155
- - [Property Validation](https://mikro-orm.io/docs/property-validation/)
156
- - [Lifecycle Hooks](https://mikro-orm.io/docs/lifecycle-hooks/)
157
- - [Vanilla JS Support](https://mikro-orm.io/docs/usage-with-js/)
158
- - [Schema Generator](https://mikro-orm.io/docs/schema-generator/)
159
- - [Entity Generator](https://mikro-orm.io/docs/entity-generator/)
132
+ - [Clean and Simple Entity Definition](https://mikro-orm.io/docs/defining-entities)
133
+ - [Identity Map](https://mikro-orm.io/docs/identity-map)
134
+ - [Entity References](https://mikro-orm.io/docs/entity-references)
135
+ - [Using Entity Constructors](https://mikro-orm.io/docs/entity-constructors)
136
+ - [Modelling Relationships](https://mikro-orm.io/docs/relationships)
137
+ - [Collections](https://mikro-orm.io/docs/collections)
138
+ - [Unit of Work](https://mikro-orm.io/docs/unit-of-work)
139
+ - [Transactions](https://mikro-orm.io/docs/transactions)
140
+ - [Cascading persist and remove](https://mikro-orm.io/docs/cascading)
141
+ - [Composite and Foreign Keys as Primary Key](https://mikro-orm.io/docs/composite-keys)
142
+ - [Filters](https://mikro-orm.io/docs/filters)
143
+ - [Using `QueryBuilder`](https://mikro-orm.io/docs/query-builder)
144
+ - [Preloading Deeply Nested Structures via populate](https://mikro-orm.io/docs/nested-populate)
145
+ - [Property Validation](https://mikro-orm.io/docs/property-validation)
146
+ - [Lifecycle Hooks](https://mikro-orm.io/docs/lifecycle-hooks)
147
+ - [Vanilla JS Support](https://mikro-orm.io/docs/usage-with-js)
148
+ - [Schema Generator](https://mikro-orm.io/docs/schema-generator)
149
+ - [Entity Generator](https://mikro-orm.io/docs/entity-generator)
160
150
 
161
151
  ## 📦 Example Integrations
162
152
 
@@ -173,27 +163,14 @@ You can find example integrations for some popular frameworks in the [`mikro-orm
173
163
  - [NextJS + MySQL](https://github.com/jonahallibone/mikro-orm-nextjs)
174
164
 
175
165
  ### JavaScript Examples
176
- - [Express + MongoDB](https://github.com/mikro-orm/express-js-example-app)
177
166
 
178
- ## Articles
179
-
180
- - Introducing MikroORM, TypeScript data-mapper ORM with Identity Map
181
- - on [medium.com](https://medium.com/dailyjs/introducing-mikro-orm-typescript-data-mapper-orm-with-identity-map-9ba58d049e02)
182
- - on [dev.to](https://dev.to/b4nan/introducing-mikroorm-typescript-data-mapper-orm-with-identity-map-pc8)
183
- - Handling transactions and concurrency in MikroORM
184
- - on [medium.com](https://medium.com/dailyjs/handling-transactions-and-concurrency-in-mikro-orm-ba80d0a65805)
185
- - on [dev.to](https://dev.to/b4nan/handling-transactions-and-concurrency-in-mikroorm-2cfj)
186
- - MikroORM 3: Knex.js, CLI, Schema Updates, Entity Generator and more…
187
- - on [medium.com](https://medium.com/dailyjs/mikro-orm-3-knex-js-cli-schema-updates-entity-generator-and-more-e51ecbbc508c)
188
- - on [dev.to](https://dev.to/b4nan/mikroorm-3-knex-js-cli-schema-updates-entity-generator-and-more-3g56)
167
+ - [Express + MongoDB](https://github.com/mikro-orm/express-js-example-app)
189
168
 
190
169
  ## 🚀 Quick Start
191
170
 
192
171
  First install the module via `yarn` or `npm` and do not forget to install the database driver as well:
193
172
 
194
- > Since v4, you should install the driver package, but not the db connector itself,
195
- > e.g. install `@mikro-orm/sqlite`, but not `sqlite3` as that is already included
196
- > in the driver package.
173
+ > Since v4, you should install the driver package, but not the db connector itself, e.g. install `@mikro-orm/sqlite`, but not `sqlite3` as that is already included in the driver package.
197
174
 
198
175
  ```sh
199
176
  yarn add @mikro-orm/core @mikro-orm/mongodb # for mongo
@@ -213,8 +190,7 @@ npm i -s @mikro-orm/core @mikro-orm/postgresql # for postgresql
213
190
  npm i -s @mikro-orm/core @mikro-orm/sqlite # for sqlite
214
191
  ```
215
192
 
216
- Next you will need to enable support for [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html)
217
- as well as `esModuleInterop` in `tsconfig.json` via:
193
+ Next, if you want to use decorators for your entity definition, you will need to enable support for [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) as well as `esModuleInterop` in `tsconfig.json` via:
218
194
 
219
195
  ```json
220
196
  "experimentalDecorators": true,
@@ -222,11 +198,11 @@ as well as `esModuleInterop` in `tsconfig.json` via:
222
198
  "esModuleInterop": true,
223
199
  ```
224
200
 
201
+ Alternatively, you can use [`EntitySchema`](https://mikro-orm.io/docs/entity-schema).
202
+
225
203
  Then call `MikroORM.init` as part of bootstrapping your app:
226
204
 
227
- > To access driver specific methods like `em.createQueryBuilder()` we need to specify
228
- > the driver type when calling `MikroORM.init()`. Alternatively we can cast the
229
- > `orm.em` to `EntityManager` exported from the driver package:
205
+ > To access driver specific methods like `em.createQueryBuilder()` we need to specify the driver type when calling `MikroORM.init()`. Alternatively we can cast the `orm.em` to `EntityManager` exported from the driver package:
230
206
  >
231
207
  > ```ts
232
208
  > import { EntityManager } from '@mikro-orm/postgresql';
@@ -245,14 +221,11 @@ const orm = await MikroORM.init<PostgreSqlDriver>({
245
221
  console.log(orm.em); // access EntityManager via `em` property
246
222
  ```
247
223
 
248
- There are more ways to configure your entities, take a look at
249
- [installation page](https://mikro-orm.io/docs/installation/).
224
+ There are more ways to configure your entities, take a look at [installation page](https://mikro-orm.io/docs/installation/).
250
225
 
251
226
  > Read more about all the possible configuration options in [Advanced Configuration](https://mikro-orm.io/docs/configuration) section.
252
227
 
253
- Then you will need to fork entity manager for each request so their
254
- [identity maps](https://mikro-orm.io/docs/identity-map/) will not collide.
255
- To do so, use the `RequestContext` helper:
228
+ Then you will need to fork entity manager for each request so their [identity maps](https://mikro-orm.io/docs/identity-map/) will not collide. To do so, use the `RequestContext` helper:
256
229
 
257
230
  ```typescript
258
231
  const app = express();
@@ -262,15 +235,11 @@ app.use((req, res, next) => {
262
235
  });
263
236
  ```
264
237
 
265
- > You should register this middleware as the last one just before request handlers and before
266
- > any of your custom middleware that is using the ORM. There might be issues when you register
267
- > it before request processing middleware like `queryParser` or `bodyParser`, so definitely
268
- > register the context after them.
238
+ > You should register this middleware as the last one just before request handlers and before any of your custom middleware that is using the ORM. There might be issues when you register it before request processing middleware like `queryParser` or `bodyParser`, so definitely register the context after them.
269
239
 
270
240
  More info about `RequestContext` is described [here](https://mikro-orm.io/docs/identity-map/#request-context).
271
241
 
272
- Now you can start defining your entities (in one of the `entities` folders). This is how
273
- simple entity can look like in mongo driver:
242
+ Now you can start defining your entities (in one of the `entities` folders). This is how simple entity can look like in mongo driver:
274
243
 
275
244
  **`./entities/MongoBook.ts`**
276
245
 
@@ -287,10 +256,10 @@ export class MongoBook {
287
256
  @Property()
288
257
  title: string;
289
258
 
290
- @ManyToOne()
259
+ @ManyToOne(() => Author)
291
260
  author: Author;
292
261
 
293
- @ManyToMany()
262
+ @ManyToMany(() => BookTag)
294
263
  tags = new Collection<BookTag>(this);
295
264
 
296
265
  constructor(title: string, author: Author) {
@@ -331,15 +300,11 @@ export class UuidBook {
331
300
  }
332
301
  ```
333
302
 
334
- More information can be found in
335
- [defining entities section](https://mikro-orm.io/docs/defining-entities/) in docs.
303
+ More information can be found in [defining entities section](https://mikro-orm.io/docs/defining-entities/) in docs.
336
304
 
337
- When you have your entities defined, you can start using ORM either via `EntityManager`
338
- or via `EntityRepository`s.
305
+ When you have your entities defined, you can start using ORM either via `EntityManager` or via `EntityRepository`s.
339
306
 
340
- To save entity state to database, you need to persist it. Persist takes care or deciding
341
- whether to use `insert` or `update` and computes appropriate change-set. Entity references
342
- that are not persisted yet (does not have identifier) will be cascade persisted automatically.
307
+ To save entity state to database, you need to persist it. Persist takes care or deciding whether to use `insert` or `update` and computes appropriate change-set. Entity references that are not persisted yet (does not have identifier) will be cascade persisted automatically.
343
308
 
344
309
  ```typescript
345
310
  // use constructors in your entities for required parameters
@@ -356,13 +321,13 @@ const book3 = new Book('My Life on The Wall, part 3', author);
356
321
  book3.publisher = publisher;
357
322
 
358
323
  // just persist books, author and publisher will be automatically cascade persisted
359
- await orm.em.persistAndFlush([book1, book2, book3]);
324
+ await em.persistAndFlush([book1, book2, book3]);
360
325
  ```
361
326
 
362
327
  To fetch entities from database you can use `find()` and `findOne()` of `EntityManager`:
363
328
 
364
329
  ```typescript
365
- const authors = orm.em.find(Author, {});
330
+ const authors = em.find(Author, {}, { populate: ['books'] });
366
331
 
367
332
  for (const author of authors) {
368
333
  console.log(author); // instance of Author entity
@@ -375,16 +340,11 @@ for (const author of authors) {
375
340
  }
376
341
  ```
377
342
 
378
- More convenient way of fetching entities from database is by using `EntityRepository`, that
379
- carries the entity name so you do not have to pass it to every `find` and `findOne` calls:
343
+ More convenient way of fetching entities from database is by using `EntityRepository`, that carries the entity name, so you do not have to pass it to every `find` and `findOne` calls:
380
344
 
381
345
  ```typescript
382
- const booksRepository = orm.em.getRepository(Book);
383
-
384
- // with sorting, limit and offset parameters, populating author references
385
- const books = await booksRepository.find({ author: '...' }, ['author'], { title: QueryOrder.DESC }, 2, 1);
346
+ const booksRepository = em.getRepository(Book);
386
347
 
387
- // or with options object
388
348
  const books = await booksRepository.find({ author: '...' }, {
389
349
  populate: ['author'],
390
350
  limit: 1,
@@ -392,17 +352,14 @@ const books = await booksRepository.find({ author: '...' }, {
392
352
  orderBy: { title: QueryOrder.DESC },
393
353
  });
394
354
 
395
- console.log(books); // Book[]
355
+ console.log(books); // Loaded<Book, 'author'>[]
396
356
  ```
397
357
 
398
- Take a look at docs about [working with `EntityManager`](https://mikro-orm.io/docs/entity-manager/)
399
- or [using `EntityRepository` instead](https://mikro-orm.io/docs/repositories/).
358
+ Take a look at docs about [working with `EntityManager`](https://mikro-orm.io/docs/entity-manager/) or [using `EntityRepository` instead](https://mikro-orm.io/docs/repositories/).
400
359
 
401
360
  ## 🤝 Contributing
402
361
 
403
- Contributions, issues and feature requests are welcome. Please read
404
- [CONTRIBUTING.md](CONTRIBUTING.md)
405
- for details on the process for submitting pull requests to us.
362
+ Contributions, issues and feature requests are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us.
406
363
 
407
364
  ## Authors
408
365
 
package/index.mjs CHANGED
@@ -1,6 +1,8 @@
1
1
  import mod from "./index.js";
2
2
 
3
3
  export default mod;
4
+ export const ALIAS_REPLACEMENT = mod.ALIAS_REPLACEMENT;
5
+ export const ALIAS_REPLACEMENT_RE = mod.ALIAS_REPLACEMENT_RE;
4
6
  export const ARRAY_OPERATORS = mod.ARRAY_OPERATORS;
5
7
  export const AbstractNamingStrategy = mod.AbstractNamingStrategy;
6
8
  export const AbstractSchemaGenerator = mod.AbstractSchemaGenerator;
@@ -10,6 +12,7 @@ export const AbstractSqlPlatform = mod.AbstractSqlPlatform;
10
12
  export const AfterCreate = mod.AfterCreate;
11
13
  export const AfterDelete = mod.AfterDelete;
12
14
  export const AfterUpdate = mod.AfterUpdate;
15
+ export const AfterUpsert = mod.AfterUpsert;
13
16
  export const ArrayCollection = mod.ArrayCollection;
14
17
  export const ArrayCriteriaNode = mod.ArrayCriteriaNode;
15
18
  export const ArrayType = mod.ArrayType;
@@ -17,6 +20,7 @@ export const BaseEntity = mod.BaseEntity;
17
20
  export const BeforeCreate = mod.BeforeCreate;
18
21
  export const BeforeDelete = mod.BeforeDelete;
19
22
  export const BeforeUpdate = mod.BeforeUpdate;
23
+ export const BeforeUpsert = mod.BeforeUpsert;
20
24
  export const BetterSqliteConnection = mod.BetterSqliteConnection;
21
25
  export const BetterSqliteDriver = mod.BetterSqliteDriver;
22
26
  export const BetterSqliteExceptionConverter = mod.BetterSqliteExceptionConverter;
@@ -34,11 +38,13 @@ export const Check = mod.Check;
34
38
  export const CheckConstraintViolationException = mod.CheckConstraintViolationException;
35
39
  export const Collection = mod.Collection;
36
40
  export const CommitOrderCalculator = mod.CommitOrderCalculator;
41
+ export const Config = mod.Config;
37
42
  export const Configuration = mod.Configuration;
38
43
  export const ConfigurationLoader = mod.ConfigurationLoader;
39
44
  export const Connection = mod.Connection;
40
45
  export const ConnectionException = mod.ConnectionException;
41
46
  export const ConstraintViolationException = mod.ConstraintViolationException;
47
+ export const CreateRequestContext = mod.CreateRequestContext;
42
48
  export const CriteriaNode = mod.CriteriaNode;
43
49
  export const CriteriaNodeFactory = mod.CriteriaNodeFactory;
44
50
  export const Cursor = mod.Cursor;
@@ -47,6 +53,8 @@ export const DatabaseObjectExistsException = mod.DatabaseObjectExistsException;
47
53
  export const DatabaseObjectNotFoundException = mod.DatabaseObjectNotFoundException;
48
54
  export const DatabaseSchema = mod.DatabaseSchema;
49
55
  export const DatabaseTable = mod.DatabaseTable;
56
+ export const DataloaderType = mod.DataloaderType;
57
+ export const DataloaderUtils = mod.DataloaderUtils;
50
58
  export const DateTimeType = mod.DateTimeType;
51
59
  export const DateType = mod.DateType;
52
60
  export const DeadlockException = mod.DeadlockException;
@@ -54,8 +62,10 @@ export const DecimalType = mod.DecimalType;
54
62
  export const DefaultLogger = mod.DefaultLogger;
55
63
  export const DoubleType = mod.DoubleType;
56
64
  export const DriverException = mod.DriverException;
65
+ export const EagerProps = mod.EagerProps;
57
66
  export const Embeddable = mod.Embeddable;
58
67
  export const Embedded = mod.Embedded;
68
+ export const EnsureRequestContext = mod.EnsureRequestContext;
59
69
  export const Entity = mod.Entity;
60
70
  export const EntityAssigner = mod.EntityAssigner;
61
71
  export const EntityCaseNamingStrategy = mod.EntityCaseNamingStrategy;
@@ -78,6 +88,7 @@ export const EnumArrayType = mod.EnumArrayType;
78
88
  export const EnumType = mod.EnumType;
79
89
  export const EventManager = mod.EventManager;
80
90
  export const EventType = mod.EventType;
91
+ export const EventTypeMap = mod.EventTypeMap;
81
92
  export const ExceptionConverter = mod.ExceptionConverter;
82
93
  export const FileCacheAdapter = mod.FileCacheAdapter;
83
94
  export const Filter = mod.Filter;
@@ -85,13 +96,16 @@ export const FloatType = mod.FloatType;
85
96
  export const FlushMode = mod.FlushMode;
86
97
  export const ForeignKeyConstraintViolationException = mod.ForeignKeyConstraintViolationException;
87
98
  export const Formula = mod.Formula;
99
+ export const GeneratedCacheAdapter = mod.GeneratedCacheAdapter;
88
100
  export const GroupOperator = mod.GroupOperator;
101
+ export const HiddenProps = mod.HiddenProps;
89
102
  export const Hydrator = mod.Hydrator;
90
103
  export const IdentityMap = mod.IdentityMap;
91
104
  export const Index = mod.Index;
92
105
  export const IntegerType = mod.IntegerType;
93
106
  export const InvalidFieldNameException = mod.InvalidFieldNameException;
94
107
  export const IsolationLevel = mod.IsolationLevel;
108
+ export const JoinType = mod.JoinType;
95
109
  export const JsonProperty = mod.JsonProperty;
96
110
  export const JsonType = mod.JsonType;
97
111
  export const Knex = mod.Knex;
@@ -139,13 +153,16 @@ export const QueryOperator = mod.QueryOperator;
139
153
  export const QueryOrder = mod.QueryOrder;
140
154
  export const QueryOrderNumeric = mod.QueryOrderNumeric;
141
155
  export const QueryType = mod.QueryType;
156
+ export const RawQueryFragment = mod.RawQueryFragment;
142
157
  export const ReadOnlyException = mod.ReadOnlyException;
158
+ export const Ref = mod.Ref;
143
159
  export const Reference = mod.Reference;
144
160
  export const ReferenceKind = mod.ReferenceKind;
145
161
  export const ReflectMetadataProvider = mod.ReflectMetadataProvider;
146
162
  export const RequestContext = mod.RequestContext;
147
163
  export const SCALAR_TYPES = mod.SCALAR_TYPES;
148
164
  export const ScalarCriteriaNode = mod.ScalarCriteriaNode;
165
+ export const ScalarReference = mod.ScalarReference;
149
166
  export const SchemaComparator = mod.SchemaComparator;
150
167
  export const SchemaGenerator = mod.SchemaGenerator;
151
168
  export const SchemaHelper = mod.SchemaHelper;
@@ -158,7 +175,6 @@ export const SqlEntityManager = mod.SqlEntityManager;
158
175
  export const SqlEntityRepository = mod.SqlEntityRepository;
159
176
  export const SqlSchemaGenerator = mod.SqlSchemaGenerator;
160
177
  export const StringType = mod.StringType;
161
- export const Subscriber = mod.Subscriber;
162
178
  export const SyntaxErrorException = mod.SyntaxErrorException;
163
179
  export const TableExistsException = mod.TableExistsException;
164
180
  export const TableNotFoundException = mod.TableNotFoundException;
@@ -168,12 +184,12 @@ export const TinyIntType = mod.TinyIntType;
168
184
  export const TransactionContext = mod.TransactionContext;
169
185
  export const TransactionEventBroadcaster = mod.TransactionEventBroadcaster;
170
186
  export const Type = mod.Type;
187
+ export const Uint8ArrayType = mod.Uint8ArrayType;
171
188
  export const UnderscoreNamingStrategy = mod.UnderscoreNamingStrategy;
172
189
  export const Unique = mod.Unique;
173
190
  export const UniqueConstraintViolationException = mod.UniqueConstraintViolationException;
174
191
  export const UnitOfWork = mod.UnitOfWork;
175
192
  export const UnknownType = mod.UnknownType;
176
- export const UseRequestContext = mod.UseRequestContext;
177
193
  export const Utils = mod.Utils;
178
194
  export const UuidType = mod.UuidType;
179
195
  export const ValidationError = mod.ValidationError;
@@ -184,14 +200,19 @@ export const compareArrays = mod.compareArrays;
184
200
  export const compareBooleans = mod.compareBooleans;
185
201
  export const compareBuffers = mod.compareBuffers;
186
202
  export const compareObjects = mod.compareObjects;
203
+ export const createSqlFunction = mod.createSqlFunction;
187
204
  export const defineConfig = mod.defineConfig;
188
205
  export const equals = mod.equals;
189
- export const expr = mod.expr;
206
+ export const getOnConflictFields = mod.getOnConflictFields;
207
+ export const getOnConflictReturningFields = mod.getOnConflictReturningFields;
190
208
  export const helper = mod.helper;
191
209
  export const knex = mod.knex;
210
+ export const parseJsonSafe = mod.parseJsonSafe;
211
+ export const raw = mod.raw;
192
212
  export const ref = mod.ref;
193
213
  export const rel = mod.rel;
194
214
  export const serialize = mod.serialize;
215
+ export const sql = mod.sql;
195
216
  export const t = mod.t;
196
217
  export const types = mod.types;
197
218
  export const wrap = mod.wrap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/better-sqlite",
3
- "version": "6.0.0-dev.32",
3
+ "version": "6.0.0-dev.320",
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",
@@ -46,27 +46,27 @@
46
46
  },
47
47
  "homepage": "https://mikro-orm.io",
48
48
  "engines": {
49
- "node": ">= 16.0.0"
49
+ "node": ">= 18.12.0"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "yarn clean && yarn compile && yarn copy && yarn run -T gen-esm-wrapper index.js index.mjs",
53
- "clean": "rimraf ./dist",
54
- "compile": "tsc -p tsconfig.build.json",
53
+ "clean": "yarn run -T rimraf ./dist",
54
+ "compile": "yarn run -T tsc -p tsconfig.build.json",
55
55
  "copy": "node ../../scripts/copy.mjs"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@mikro-orm/knex": "~6.0.0-dev.32",
62
- "better-sqlite3": "8.0.1",
63
- "fs-extra": "11.1.0",
61
+ "@mikro-orm/knex": "6.0.0-dev.320",
62
+ "better-sqlite3": "8.7.0",
63
+ "fs-extra": "11.2.0",
64
64
  "sqlstring-sqlite": "0.1.1"
65
65
  },
66
66
  "devDependencies": {
67
- "@mikro-orm/core": "^5.6.8"
67
+ "@mikro-orm/core": "^5.0.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@mikro-orm/core": "~6.0.0-dev.32"
70
+ "@mikro-orm/core": "6.0.0-dev.320"
71
71
  }
72
72
  }