fix(): Event group id propagation and event managements (#12157)

This commit is contained in:
Adrien de Peretti
2025-04-14 15:57:52 -03:00
committed by GitHub
parent 3a481290ea
commit 2f6963a5fb
22 changed files with 777 additions and 592 deletions
@@ -686,7 +686,7 @@ export class PostgresProvider implements IndexTypes.StorageProvider {
})
let relationsToUpsert: any[] = []
const entitiesToUpdate = cleanedData.map((entityData) => {
const entitiesToUpsert = cleanedData.map((entityData) => {
relationsToUpsert.push(
{
parent_id: entityData[parentPropertyId] as string,
@@ -714,8 +714,8 @@ export class PostgresProvider implements IndexTypes.StorageProvider {
}
})
if (entitiesToUpdate.length) {
await indexRepository.upsertMany(entitiesToUpdate, {
if (entitiesToUpsert.length) {
await indexRepository.upsertMany(entitiesToUpsert, {
onConflictAction: "merge",
onConflictFields: ["id", "name"],
onConflictMergeFields: ["data", "staled_at"],