From 540ae996ff90b876e6212ccd502f27a899a40ef7 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 28 Oct 2025 18:27:34 +0200 Subject: [PATCH] docs: fix mikro-orm imports from framework (#13885) --- .../testing-tools/page.mdx | 2 +- .../learn/fundamentals/data-models/page.mdx | 2 +- .../data-models/write-migration/page.mdx | 4 +- .../modules/db-operations/page.mdx | 22 +++++----- .../app/learn/fundamentals/modules/page.mdx | 2 +- www/apps/book/generated/edit-dates.mjs | 10 ++--- www/apps/book/public/llms-full.txt | 40 +++++++++---------- .../methods/create/page.mdx | 2 +- .../methods/delete/page.mdx | 4 +- .../methods/find/page.mdx | 12 +++--- .../methods/findAndCount/page.mdx | 12 +++--- .../methods/restore/page.mdx | 6 +-- .../methods/softDelete/page.mdx | 6 +-- .../methods/update/page.mdx | 2 +- .../methods/upsert/page.mdx | 2 +- .../methods/upsertWithReplace/page.mdx | 2 +- www/apps/resources/app/examples/page.mdx | 2 +- .../tutorials/product-reviews/page.mdx | 2 +- .../app/plugins/guides/wishlist/page.mdx | 2 +- .../restock-notification/page.mdx | 2 +- .../app/troubleshooting/test-errors/page.mdx | 2 +- www/apps/resources/generated/edit-dates.mjs | 28 ++++++------- 22 files changed, 84 insertions(+), 84 deletions(-) diff --git a/www/apps/book/app/learn/debugging-and-testing/testing-tools/page.mdx b/www/apps/book/app/learn/debugging-and-testing/testing-tools/page.mdx index 757f91b425..69611a3ba3 100644 --- a/www/apps/book/app/learn/debugging-and-testing/testing-tools/page.mdx +++ b/www/apps/book/app/learn/debugging-and-testing/testing-tools/page.mdx @@ -70,7 +70,7 @@ As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), ```js title="integration-tests/setup.js" -const { MetadataStorage } = require("@medusajs/framework/@mikro-orm/core") +const { MetadataStorage } = require("@medusajs/framework/mikro-orm/core") MetadataStorage.clear() ``` diff --git a/www/apps/book/app/learn/fundamentals/data-models/page.mdx b/www/apps/book/app/learn/fundamentals/data-models/page.mdx index 1677837c7a..920748041f 100644 --- a/www/apps/book/app/learn/fundamentals/data-models/page.mdx +++ b/www/apps/book/app/learn/fundamentals/data-models/page.mdx @@ -70,7 +70,7 @@ As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), ```ts -import { Migration } from "@medusajs/framework/@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241121103722 extends Migration { diff --git a/www/apps/book/app/learn/fundamentals/data-models/write-migration/page.mdx b/www/apps/book/app/learn/fundamentals/data-models/write-migration/page.mdx index 768393bda2..0da5ee1123 100644 --- a/www/apps/book/app/learn/fundamentals/data-models/write-migration/page.mdx +++ b/www/apps/book/app/learn/fundamentals/data-models/write-migration/page.mdx @@ -44,7 +44,7 @@ As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), ```ts title="src/modules/blog/migrations/Migration202507021059_create_author.ts" -import { Migration } from "@medusajs/framework/@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration202507021059 extends Migration { @@ -59,7 +59,7 @@ export class Migration202507021059 extends Migration { } ``` -The migration class in the file extends the `Migration` class imported from `@medusajs/framework/@mikro-orm/migrations`. In the `up` and `down` method of the migration class, you use the `addSql` method provided by MikroORM's `Migration` class to run PostgreSQL syntax. +The migration class in the file extends the `Migration` class imported from `@medusajs/framework/mikro-orm/migrations`. In the `up` and `down` method of the migration class, you use the `addSql` method provided by MikroORM's `Migration` class to run PostgreSQL syntax. In the example above, the `up` method creates the table `author`, and the `down` method drops the table if the migration is reverted. diff --git a/www/apps/book/app/learn/fundamentals/modules/db-operations/page.mdx b/www/apps/book/app/learn/fundamentals/modules/db-operations/page.mdx index f7415b685d..a69d2e949d 100644 --- a/www/apps/book/app/learn/fundamentals/modules/db-operations/page.mdx +++ b/www/apps/book/app/learn/fundamentals/modules/db-operations/page.mdx @@ -45,7 +45,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -72,7 +72,7 @@ class BlogModuleService { You add two methods `getCount` and `getCountSql` that have the `InjectManager` decorator. Each of the methods also accept the `sharedContext` parameter which has the `MedusaContext` decorator. -The entity manager is injected to the `sharedContext.manager` property, which is an instance of [EntityManager from the `@medusajs/framework/@mikro-orm/knex` package](https://mikro-orm.io/api/knex/class/EntityManager). +The entity manager is injected to the `sharedContext.manager` property, which is an instance of [EntityManager from the `@medusajs/framework/mikro-orm/knex` package](https://mikro-orm.io/api/knex/class/EntityManager). You use the manager in the `getCount` method to retrieve the number of records in a table, and in the `getCountSql` to run a PostgreSQL query that retrieves the count. @@ -119,7 +119,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -180,7 +180,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -227,7 +227,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -386,7 +386,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -518,7 +518,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -588,7 +588,7 @@ The second parameter of the `baseRepository_.transaction` method is an object of ```ts highlights={[["24"]]} // other imports... -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import { InjectTransactionManager, MedusaContext, @@ -631,8 +631,8 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" -import { IsolationLevel } from "@medusajs/framework/@mikro-orm/core" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" +import { IsolationLevel } from "@medusajs/framework/mikro-orm/core" class BlogModuleService { // ... @@ -666,7 +666,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... diff --git a/www/apps/book/app/learn/fundamentals/modules/page.mdx b/www/apps/book/app/learn/fundamentals/modules/page.mdx index 024a243bb4..11afc9df66 100644 --- a/www/apps/book/app/learn/fundamentals/modules/page.mdx +++ b/www/apps/book/app/learn/fundamentals/modules/page.mdx @@ -202,7 +202,7 @@ As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), ```ts -import { Migration } from "@medusajs/framework/@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241121103722 extends Migration { diff --git a/www/apps/book/generated/edit-dates.mjs b/www/apps/book/generated/edit-dates.mjs index 28dea8034c..7c04706204 100644 --- a/www/apps/book/generated/edit-dates.mjs +++ b/www/apps/book/generated/edit-dates.mjs @@ -20,7 +20,7 @@ export const generatedEditDates = { "app/learn/fundamentals/workflows/execute-another-workflow/page.mdx": "2025-08-01T07:28:51.036Z", "app/learn/fundamentals/modules/loaders/page.mdx": "2025-10-09T11:41:31.724Z", "app/learn/fundamentals/admin/widgets/page.mdx": "2025-07-25T15:08:07.035Z", - "app/learn/fundamentals/data-models/page.mdx": "2025-10-09T11:39:30.944Z", + "app/learn/fundamentals/data-models/page.mdx": "2025-10-28T16:01:48.099Z", "app/learn/fundamentals/modules/remote-link/page.mdx": "2024-09-30T08:43:53.127Z", "app/learn/fundamentals/api-routes/protected-routes/page.mdx": "2025-06-19T16:04:36.064Z", "app/learn/fundamentals/workflows/add-workflow-hook/page.mdx": "2025-07-18T11:33:15.959Z", @@ -32,7 +32,7 @@ export const generatedEditDates = { "app/learn/fundamentals/admin/page.mdx": "2025-07-25T12:46:15.466Z", "app/learn/fundamentals/workflows/long-running-workflow/page.mdx": "2025-08-01T07:16:21.736Z", "app/learn/fundamentals/workflows/constructor-constraints/page.mdx": "2025-08-01T13:11:18.823Z", - "app/learn/fundamentals/data-models/write-migration/page.mdx": "2025-10-09T11:39:07.940Z", + "app/learn/fundamentals/data-models/write-migration/page.mdx": "2025-10-28T16:01:36.609Z", "app/learn/fundamentals/data-models/manage-relationships/page.mdx": "2025-04-25T14:16:41.124Z", "app/learn/fundamentals/modules/remote-query/page.mdx": "2024-07-21T21:20:24+02:00", "app/learn/fundamentals/modules/options/page.mdx": "2025-03-18T15:12:34.510Z", @@ -53,7 +53,7 @@ export const generatedEditDates = { "app/learn/debugging-and-testing/testing-tools/integration-tests/api-routes/page.mdx": "2025-09-02T08:36:12.714Z", "app/learn/debugging-and-testing/testing-tools/integration-tests/page.mdx": "2024-12-09T15:52:01.019Z", "app/learn/debugging-and-testing/testing-tools/integration-tests/workflows/page.mdx": "2025-07-30T13:43:44.636Z", - "app/learn/debugging-and-testing/testing-tools/page.mdx": "2025-10-09T11:38:33.099Z", + "app/learn/debugging-and-testing/testing-tools/page.mdx": "2025-10-28T16:01:29.630Z", "app/learn/debugging-and-testing/testing-tools/unit-tests/module-example/page.mdx": "2024-09-02T11:04:27.232Z", "app/learn/debugging-and-testing/testing-tools/unit-tests/page.mdx": "2024-09-02T11:03:26.997Z", "app/learn/fundamentals/modules/service-constraints/page.mdx": "2025-03-18T15:12:46.006Z", @@ -66,9 +66,9 @@ export const generatedEditDates = { "app/learn/fundamentals/module-links/directions/page.mdx": "2025-03-17T12:52:06.161Z", "app/learn/fundamentals/module-links/page.mdx": "2025-04-17T08:50:17.036Z", "app/learn/fundamentals/module-links/query/page.mdx": "2025-10-27T09:30:26.957Z", - "app/learn/fundamentals/modules/db-operations/page.mdx": "2025-10-09T11:43:28.746Z", + "app/learn/fundamentals/modules/db-operations/page.mdx": "2025-10-28T16:02:06.265Z", "app/learn/fundamentals/modules/multiple-services/page.mdx": "2025-03-18T15:11:44.632Z", - "app/learn/fundamentals/modules/page.mdx": "2025-10-09T11:41:57.515Z", + "app/learn/fundamentals/modules/page.mdx": "2025-10-28T16:02:08.857Z", "app/learn/debugging-and-testing/instrumentation/page.mdx": "2025-10-09T11:37:32.815Z", "app/learn/fundamentals/api-routes/additional-data/page.mdx": "2025-04-17T08:50:17.036Z", "app/learn/fundamentals/workflows/variable-manipulation/page.mdx": "2025-04-24T13:14:43.967Z", diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index dc5c6dc65b..55731a6579 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -6367,7 +6367,7 @@ Next, create the `integration-tests/setup.js` file with the following content: As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the require statement to `@mikro-orm/core`. ```js title="integration-tests/setup.js" -const { MetadataStorage } = require("@medusajs/framework/@mikro-orm/core") +const { MetadataStorage } = require("@medusajs/framework/mikro-orm/core") MetadataStorage.clear() ``` @@ -11549,7 +11549,7 @@ The `db:generate` command of the Medusa CLI accepts one or more module names to As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/migrations`. ```ts -import { Migration } from "@medusajs/framework/@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241121103722 extends Migration { @@ -12320,7 +12320,7 @@ For example: As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/migrations`. ```ts title="src/modules/blog/migrations/Migration202507021059_create_author.ts" -import { Migration } from "@medusajs/framework/@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration202507021059 extends Migration { @@ -12335,7 +12335,7 @@ export class Migration202507021059 extends Migration { } ``` -The migration class in the file extends the `Migration` class imported from `@medusajs/framework/@mikro-orm/migrations`. In the `up` and `down` method of the migration class, you use the `addSql` method provided by MikroORM's `Migration` class to run PostgreSQL syntax. +The migration class in the file extends the `Migration` class imported from `@medusajs/framework/mikro-orm/migrations`. In the `up` and `down` method of the migration class, you use the `addSql` method provided by MikroORM's `Migration` class to run PostgreSQL syntax. In the example above, the `up` method creates the table `author`, and the `down` method drops the table if the migration is reverted. @@ -17667,7 +17667,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -17694,7 +17694,7 @@ class BlogModuleService { You add two methods `getCount` and `getCountSql` that have the `InjectManager` decorator. Each of the methods also accept the `sharedContext` parameter which has the `MedusaContext` decorator. -The entity manager is injected to the `sharedContext.manager` property, which is an instance of [EntityManager from the `@medusajs/framework/@mikro-orm/knex` package](https://mikro-orm.io/api/knex/class/EntityManager). +The entity manager is injected to the `sharedContext.manager` property, which is an instance of [EntityManager from the `@medusajs/framework/mikro-orm/knex` package](https://mikro-orm.io/api/knex/class/EntityManager). You use the manager in the `getCount` method to retrieve the number of records in a table, and in the `getCountSql` to run a PostgreSQL query that retrieves the count. @@ -17731,7 +17731,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -17788,7 +17788,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -17831,7 +17831,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -17964,7 +17964,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -18079,7 +18079,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -18145,7 +18145,7 @@ The second parameter of the `baseRepository_.transaction` method is an object of ```ts highlights={[["24"]]} // other imports... -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import { InjectTransactionManager, MedusaContext, @@ -18188,8 +18188,8 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" -import { IsolationLevel } from "@medusajs/framework/@mikro-orm/core" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" +import { IsolationLevel } from "@medusajs/framework/mikro-orm/core" class BlogModuleService { // ... @@ -18223,7 +18223,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -19289,7 +19289,7 @@ The `db:generate` command of the Medusa CLI accepts one or more module names to As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), MikroORM dependencies are included in the `@medusajs/framework` package. If you're using an older version of Medusa, change the import statement to `@mikro-orm/migrations`. ```ts -import { Migration } from "@medusajs/framework/@mikro-orm/migrations" +import { Migration } from "@medusajs/framework/mikro-orm/migrations" export class Migration20241121103722 extends Migration { @@ -56054,7 +56054,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... @@ -80266,7 +80266,7 @@ In `src/modules/product-review/service.ts`, add the following methods to the `Pr import { InjectManager, MedusaService, MedusaContext } from "@medusajs/framework/utils" import Review from "./models/review" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class ProductReviewModuleService extends MedusaService({ Review, @@ -102246,7 +102246,7 @@ In `src/modules/wishlist/service.ts`, add the following imports and method: // other imports... import { InjectManager } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" export default class WishlistModuleService extends MedusaService({ Wishlist, @@ -121204,7 +121204,7 @@ Before adding the step that does this, you'll add a method in the `RestockModule // other imports... import { InjectManager, MedusaContext } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class RestockModuleService extends MedusaService({ RestockSubscription, diff --git a/www/apps/resources/app/data-model-repository-reference/methods/create/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/create/page.mdx index a420fd33d0..52a94960f0 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/create/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/create/page.mdx @@ -49,7 +49,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/data-model-repository-reference/methods/delete/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/delete/page.mdx index be166f4a5a..0be1558da6 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/delete/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/delete/page.mdx @@ -48,7 +48,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -98,7 +98,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/data-model-repository-reference/methods/find/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/find/page.mdx index fd34dc35b6..446ea17101 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/find/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/find/page.mdx @@ -106,7 +106,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -149,7 +149,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -213,7 +213,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -285,7 +285,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -349,7 +349,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -416,7 +416,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/data-model-repository-reference/methods/findAndCount/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/findAndCount/page.mdx index 0a3d4bd083..69ae52caab 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/findAndCount/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/findAndCount/page.mdx @@ -112,7 +112,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -162,7 +162,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -232,7 +232,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -312,7 +312,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -384,7 +384,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -445,7 +445,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/data-model-repository-reference/methods/restore/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/restore/page.mdx index c87ad9ab93..8ab2ec72e5 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/restore/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/restore/page.mdx @@ -50,7 +50,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -146,7 +146,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -242,7 +242,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/data-model-repository-reference/methods/softDelete/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/softDelete/page.mdx index 9780b000c8..35917b0c46 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/softDelete/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/softDelete/page.mdx @@ -52,7 +52,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -148,7 +148,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ @@ -244,7 +244,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/data-model-repository-reference/methods/update/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/update/page.mdx index 54e333f0ee..2c28b41958 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/update/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/update/page.mdx @@ -63,7 +63,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/data-model-repository-reference/methods/upsert/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/upsert/page.mdx index 2ef4814d19..ea1401f40e 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/upsert/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/upsert/page.mdx @@ -48,7 +48,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/data-model-repository-reference/methods/upsertWithReplace/page.mdx b/www/apps/resources/app/data-model-repository-reference/methods/upsertWithReplace/page.mdx index 7328f6fc4e..dcb4a72e49 100644 --- a/www/apps/resources/app/data-model-repository-reference/methods/upsertWithReplace/page.mdx +++ b/www/apps/resources/app/data-model-repository-reference/methods/upsertWithReplace/page.mdx @@ -54,7 +54,7 @@ import { MedusaService, } from "@medusajs/framework/utils" import { Context, InferTypeOf, DAL } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" import Post from "./models/post" class BlogModuleService extends MedusaService({ diff --git a/www/apps/resources/app/examples/page.mdx b/www/apps/resources/app/examples/page.mdx index d097ff4e25..6c03655d11 100644 --- a/www/apps/resources/app/examples/page.mdx +++ b/www/apps/resources/app/examples/page.mdx @@ -1646,7 +1646,7 @@ import { MedusaContext, } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class BlogModuleService { // ... diff --git a/www/apps/resources/app/how-to-tutorials/tutorials/product-reviews/page.mdx b/www/apps/resources/app/how-to-tutorials/tutorials/product-reviews/page.mdx index 53205f2c58..fa74aacaff 100644 --- a/www/apps/resources/app/how-to-tutorials/tutorials/product-reviews/page.mdx +++ b/www/apps/resources/app/how-to-tutorials/tutorials/product-reviews/page.mdx @@ -1484,7 +1484,7 @@ In `src/modules/product-review/service.ts`, add the following methods to the `Pr import { InjectManager, MedusaService, MedusaContext } from "@medusajs/framework/utils" import Review from "./models/review" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class ProductReviewModuleService extends MedusaService({ Review, diff --git a/www/apps/resources/app/plugins/guides/wishlist/page.mdx b/www/apps/resources/app/plugins/guides/wishlist/page.mdx index e7ad1d4adb..8dbc66c51a 100644 --- a/www/apps/resources/app/plugins/guides/wishlist/page.mdx +++ b/www/apps/resources/app/plugins/guides/wishlist/page.mdx @@ -1958,7 +1958,7 @@ In `src/modules/wishlist/service.ts`, add the following imports and method: // other imports... import { InjectManager } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" export default class WishlistModuleService extends MedusaService({ Wishlist, diff --git a/www/apps/resources/app/recipes/commerce-automation/restock-notification/page.mdx b/www/apps/resources/app/recipes/commerce-automation/restock-notification/page.mdx index 27a8ba2747..e68e42277d 100644 --- a/www/apps/resources/app/recipes/commerce-automation/restock-notification/page.mdx +++ b/www/apps/resources/app/recipes/commerce-automation/restock-notification/page.mdx @@ -1133,7 +1133,7 @@ Before adding the step that does this, you'll add a method in the `RestockModule // other imports... import { InjectManager, MedusaContext } from "@medusajs/framework/utils" import { Context } from "@medusajs/framework/types" -import { EntityManager } from "@medusajs/framework/@mikro-orm/knex" +import { EntityManager } from "@medusajs/framework/mikro-orm/knex" class RestockModuleService extends MedusaService({ RestockSubscription, diff --git a/www/apps/resources/app/troubleshooting/test-errors/page.mdx b/www/apps/resources/app/troubleshooting/test-errors/page.mdx index 44558c7b28..326cccfc25 100644 --- a/www/apps/resources/app/troubleshooting/test-errors/page.mdx +++ b/www/apps/resources/app/troubleshooting/test-errors/page.mdx @@ -24,7 +24,7 @@ module.exports = { Then, create the `integration-tests/setup.js` file with the following content: ```js title="integration-tests/setup.js" -const { MetadataStorage } = require("@medusajs/framework/@mikro-orm/core") +const { MetadataStorage } = require("@medusajs/framework/mikro-orm/core") MetadataStorage.clear() ``` diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 3259a4c5a3..151c50c1e5 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -2165,7 +2165,7 @@ export const generatedEditDates = { "app/commerce-modules/sales-channel/links-to-other-modules/page.mdx": "2025-04-17T16:00:09.483Z", "app/commerce-modules/stock-location/links-to-other-modules/page.mdx": "2025-04-17T16:02:51.467Z", "app/commerce-modules/store/links-to-other-modules/page.mdx": "2025-04-17T16:03:16.419Z", - "app/examples/page.mdx": "2025-09-29T15:36:18.867Z", + "app/examples/page.mdx": "2025-10-28T16:02:32.447Z", "app/medusa-cli/commands/build/page.mdx": "2025-09-01T15:30:05.995Z", "app/js-sdk/page.mdx": "2025-08-01T14:17:07.509Z", "references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.apiKey/page.mdx": "2025-10-21T08:10:55.265Z", @@ -5560,7 +5560,7 @@ export const generatedEditDates = { "references/modules/sales_channel_models/page.mdx": "2024-12-10T14:55:13.205Z", "references/types/DmlTypes/types/types.DmlTypes.KnownDataTypes/page.mdx": "2024-12-17T16:57:19.922Z", "references/types/DmlTypes/types/types.DmlTypes.RelationshipTypes/page.mdx": "2024-12-10T14:54:55.435Z", - "app/recipes/commerce-automation/restock-notification/page.mdx": "2025-10-21T12:06:58.024Z", + "app/recipes/commerce-automation/restock-notification/page.mdx": "2025-10-28T16:02:37.771Z", "app/integrations/guides/shipstation/page.mdx": "2025-05-20T07:51:40.717Z", "app/nextjs-starter/guides/customize-stripe/page.mdx": "2025-07-15T08:50:51.997Z", "references/core_flows/Cart/Workflows_Cart/functions/core_flows.Cart.Workflows_Cart.listShippingOptionsForCartWithPricingWorkflow/page.mdx": "2025-09-18T17:04:38.644Z", @@ -5827,7 +5827,7 @@ export const generatedEditDates = { "references/core_flows/types/core_flows.ThrowUnlessPaymentCollectionNotePaidInput/page.mdx": "2025-06-25T10:11:33.516Z", "references/core_flows/types/core_flows.ValidatePaymentsRefundStepInput/page.mdx": "2025-06-25T10:11:34.185Z", "references/core_flows/types/core_flows.ValidateRefundStepInput/page.mdx": "2025-09-12T14:10:36.022Z", - "app/plugins/guides/wishlist/page.mdx": "2025-09-29T15:35:46.093Z", + "app/plugins/guides/wishlist/page.mdx": "2025-10-28T16:02:36.573Z", "app/plugins/page.mdx": "2025-02-26T11:39:25.709Z", "app/admin-components/components/data-table/page.mdx": "2025-03-03T14:55:58.556Z", "references/order_models/variables/order_models.Order/page.mdx": "2025-10-25T20:14:21.335Z", @@ -5866,7 +5866,7 @@ export const generatedEditDates = { "references/types/interfaces/types.BaseProductTypeListParams/page.mdx": "2025-01-27T11:43:54.550Z", "references/core_flows/Order/Steps_Order/variables/core_flows.Order.Steps_Order.updateOrderChangesStepId/page.mdx": "2025-01-27T11:43:49.278Z", "app/commerce-modules/payment/account-holder/page.mdx": "2025-04-07T07:31:20.235Z", - "app/troubleshooting/test-errors/page.mdx": "2025-09-29T15:35:52.805Z", + "app/troubleshooting/test-errors/page.mdx": "2025-10-28T16:02:39.347Z", "app/commerce-modules/product/variant-inventory/page.mdx": "2025-04-25T13:25:02.408Z", "app/examples/guides/custom-item-price/page.mdx": "2025-06-26T11:53:06.748Z", "references/core_flows/Cart/Steps_Cart/functions/core_flows.Cart.Steps_Cart.validateShippingStep/page.mdx": "2025-04-11T09:04:35.729Z", @@ -6032,7 +6032,7 @@ export const generatedEditDates = { "app/nextjs-starter/guides/revalidate-cache/page.mdx": "2025-05-01T15:33:42.490Z", "app/storefront-development/cart/totals/page.mdx": "2025-09-15T15:13:56.268Z", "app/storefront-development/checkout/order-confirmation/page.mdx": "2025-08-14T15:58:36.610Z", - "app/how-to-tutorials/tutorials/product-reviews/page.mdx": "2025-10-09T11:28:53.803Z", + "app/how-to-tutorials/tutorials/product-reviews/page.mdx": "2025-10-28T16:02:34.678Z", "app/troubleshooting/data-models/default-fields/page.mdx": "2025-03-21T06:59:06.775Z", "app/troubleshooting/medusa-admin/blocked-request/page.mdx": "2025-03-21T06:53:34.854Z", "app/troubleshooting/nextjs-starter-rewrites/page.mdx": "2025-03-21T07:09:08.901Z", @@ -6607,15 +6607,15 @@ export const generatedEditDates = { "app/integrations/guides/meilisearch/page.mdx": "2025-10-21T10:51:27.358Z", "app/nextjs-starter/guides/storefront-returns/page.mdx": "2025-09-22T06:02:00.580Z", "references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.views/page.mdx": "2025-10-21T08:10:55.384Z", - "app/data-model-repository-reference/methods/create/page.mdx": "2025-10-09T11:42:23.826Z", - "app/data-model-repository-reference/methods/delete/page.mdx": "2025-10-09T11:42:59.141Z", - "app/data-model-repository-reference/methods/find/page.mdx": "2025-10-09T11:43:05.478Z", - "app/data-model-repository-reference/methods/findAndCount/page.mdx": "2025-10-09T11:43:49.941Z", - "app/data-model-repository-reference/methods/restore/page.mdx": "2025-10-09T11:44:02.906Z", - "app/data-model-repository-reference/methods/softDelete/page.mdx": "2025-10-09T11:44:16.158Z", - "app/data-model-repository-reference/methods/upsert/page.mdx": "2025-10-09T11:44:39.838Z", - "app/data-model-repository-reference/methods/update/page.mdx": "2025-10-09T11:44:27.403Z", - "app/data-model-repository-reference/methods/upsertWithReplace/page.mdx": "2025-10-09T11:44:53.535Z", + "app/data-model-repository-reference/methods/create/page.mdx": "2025-10-28T16:02:14.959Z", + "app/data-model-repository-reference/methods/delete/page.mdx": "2025-10-28T16:02:17.380Z", + "app/data-model-repository-reference/methods/find/page.mdx": "2025-10-28T16:02:20.099Z", + "app/data-model-repository-reference/methods/findAndCount/page.mdx": "2025-10-28T16:02:22.426Z", + "app/data-model-repository-reference/methods/restore/page.mdx": "2025-10-28T16:02:25.127Z", + "app/data-model-repository-reference/methods/softDelete/page.mdx": "2025-10-28T16:02:26.363Z", + "app/data-model-repository-reference/methods/upsert/page.mdx": "2025-10-28T16:02:28.730Z", + "app/data-model-repository-reference/methods/update/page.mdx": "2025-10-28T16:02:27.582Z", + "app/data-model-repository-reference/methods/upsertWithReplace/page.mdx": "2025-10-28T16:02:30.479Z", "app/how-to-tutorials/tutorials/agentic-commerce/page.mdx": "2025-10-09T11:25:48.831Z", "app/storefront-development/production-optimizations/page.mdx": "2025-10-03T13:28:37.909Z", "app/infrastructure-modules/caching/page.mdx": "2025-10-13T11:46:36.452Z",