This commit is contained in:
D065023
2019-12-16 21:12:03 +01:00
parent dc8e8c55df
commit 125edc34e2

View File

@@ -19,10 +19,12 @@ const queriesToUpdateDifferences = (entity, ownEntries, otherEntries) =>
if (Object.keys(diff).length) { if (Object.keys(diff).length) {
return UPDATE(entity) return UPDATE(entity)
.set(differences) .set(differences)
.where({ .where(
BusinessPartner: ownEntry.BusinessPartner, Object.keys(entity.keys).reduce(
AddressID: ownEntry.AddressID (res, curr) => (res[curr] = ownEntry[curr]) && res,
}) {}
)
)
} }
} }
}) })