You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today when update closure is called the whole value is updated even if:
not all its relationships changed
maybe even nothing changed at all
Idea would be to:
do nothing when nothing changed (no update or update applied the same value)
only update what changed (if a nested entity did not change: do not update it)
Basic Example
// BEFORE: triggers an update on A and all its children
// AFTER: triggers nothing
identityMap.store(A.self, id: a.id){ _ in}
// BEFORE: triggers an update on A, B and C
// AFTER: triggers an update on A and C (B did not change)
identityMap.store(A.self, id: a.id){
$0.b = $0.b
$0.c = newValue
}
Unresolved questions
No response
The text was updated successfully, but these errors were encountered:
Summary
Today when update closure is called the whole value is updated even if:
Idea would be to:
Basic Example
Unresolved questions
No response
The text was updated successfully, but these errors were encountered: