Using copyWith
on a nullable FK results in no changes if value is null
#3466
Labels
copyWith
on a nullable FK results in no changes if value is null
#3466
Describe the bug
I have a table with an FK
deviceGroupId
which references another table calleddeviceGroup
:In my DAO, I have a function
updatePopulatedDeviceGroup
that can update the FK to either another ID or to null. Although updating it to an actual value works, setting it tonull
does not affect the row, aswriteReturning
returns the same row with the same value. Here, I am callingupdatePopulatedDeviceGroup(..., null)
:Note that, if I set a new companion with all other values absent, it works just fine, e.g.
The text was updated successfully, but these errors were encountered: