Open Masterxilo opened 4 years ago
I am privately forking this repository and fixing this for myself for now.
my fix:
if (resource[key] !== undefined) {
if (resource[key] && ResourceHelper.className(resource[key])
.find(function (className) { return className == 'Resource'; })
else if (resource[key] && Array.isArray(resource[key])) {
the rest is unchanged
Because of this line
https://github.com/mpbalmeida/hal-4-angular/blob/bce59f19716890c8d379ade4fec073d1197e6060/src/resource-helper.ts#L63
it is impossible to submit the value
null
for a property to the backend. You delete all properties with the valuenull
!Please consider not filtering out this value. It must be possible to reset database columns to null when an empty value is used!
see also https://github.com/masvis/angular4-hal/issues/75