fix(index): preserve existing fields configuration (#13639) (#13640)

Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
This commit is contained in:
authored and GitHub committed 2025-10-02 11:53:56 +02:00
1 parent 02b6d01382
commit 9361f9c25a
2 files changed
+8 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/index": patch
---
fix(index): preserve existing fields configuration (#13639)
@@ -845,7 +845,9 @@ function processEntity(
] ]
intermediateEntityObjectRepresentationRef.moduleConfig = intermediateEntityObjectRepresentationRef.moduleConfig =
intermediateEntityModule intermediateEntityModule
intermediateEntityObjectRepresentationRef.fields = ["id"] if (!intermediateEntityObjectRepresentationRef.fields.includes("id")) {
intermediateEntityObjectRepresentationRef.fields.push("id")
}
/** /**
* We push the parent id only between intermediate entities but not between intermediate and link * We push the parent id only between intermediate entities but not between intermediate and link