fix(): Event group id propagation and event managements (#12157)
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user