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) {
return UPDATE(entity)
.set(differences)
.where({
BusinessPartner: ownEntry.BusinessPartner,
AddressID: ownEntry.AddressID
})
.where(
Object.keys(entity.keys).reduce(
(res, curr) => (res[curr] = ownEntry[curr]) && res,
{}
)
)
}
}
})