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
Not really sure if this is a bug or by design... if you declare an alias for a field. And then try to update the field (not the alias) via PATCH, the update does not go through and no error message or warning is thrown.
If you want to update startDate field via PATCH method it returns a 200 status code but the update is no applied. Furthermore if you read the request with preUpdate method, the correct updated value is received within the request body, but if you read the result in postUpdate method, the old value is applied.
My guesss is, this is due to a missmatch in value between the "real" field (startDate) and its alias "startRound1". As far as I know this does not reflectthe way mongoose handles this. I think the original field should always precede its own alias.
The text was updated successfully, but these errors were encountered:
Not really sure if this is a bug or by design... if you declare an alias for a field. And then try to update the field (not the alias) via PATCH, the update does not go through and no error message or warning is thrown.
For example consider this schema
If you want to update startDate field via PATCH method it returns a 200 status code but the update is no applied. Furthermore if you read the request with
preUpdate
method, the correct updated value is received within the request body, but if you read the result inpostUpdate
method, the old value is applied.My guesss is, this is due to a missmatch in value between the "real" field (startDate) and its alias "startRound1". As far as I know this does not reflectthe way mongoose handles this. I think the original field should always precede its own alias.
The text was updated successfully, but these errors were encountered: