diff --git a/www/apps/docs/content/development/entities/extend-repository.md b/www/apps/docs/content/development/entities/extend-repository.md index 58804c08f5..a99b58ffb3 100644 --- a/www/apps/docs/content/development/entities/extend-repository.md +++ b/www/apps/docs/content/development/entities/extend-repository.md @@ -54,7 +54,7 @@ export const ProductRepository = dataSource .extend({ // it is important to spread the existing repository here. // Otherwise you will end up losing core properties - ...MedusaProductRepository, + ...Object.assign(MedusaProductRepository, { target: Product }), /** * Here you can create your custom function