couchbaselabs / node-ottoman

Node.js ODM for Couchbase
https://ottomanjs.com/
Apache License 2.0
287 stars 98 forks source link

incomplete update of array object when using updateById #726

Closed oaikaoz closed 1 year ago

oaikaoz commented 1 year ago

Hello everyone,

I have recently updated the OttomanJS library to version 2.3.3. However, after the update, I noticed a change in the behavior of the data update process. Here is an example:

Initially, my data structure was as follows:

//data current  {address: [{city: "xxx1"}, {city: xxx2}]}

 const dataUpdated = await User.updateById(id, {address: [{city: "xxx3"}]});

 console.log(dataUpdated); //  {address: [{city: "xxx3"}, {city: xxx2}]}

When I use the updateById function to update the data as address: [{city: xxx3}], the resulting data from the updateById function still contains two array objects instead of one.

Thank you.

gsi-alejandro commented 1 year ago

hi @oaikaoz

I was checking and found a bug related to this.

A new fix was implemented and will be released in the next version (soon this week)

thank you for your feedback.

oaikaoz commented 1 year ago

@gsi-alejandro That's great, thank you

oaikaoz commented 1 year ago

hi @oaikaoz

I was checking and found a bug related to this.

A new fix was implemented and will be released in the next version (soon this week)

thank you for your feedback.

hi @gsi-alejandro

May I kindly inquire about the expected release date for the version with the fix

thank you

ejscribner commented 1 year ago

Hey @oaikaoz, thanks for following up. We will release a new version with the changes early next week (monday or tuesday). Apologies for the delay here, and thank you for your patience 🙂

oaikaoz commented 1 year ago

Hey @oaikaoz, thanks for following up. We will release a new version with the changes early next week (monday or tuesday). Apologies for the delay here, and thank you for your patience 🙂

hi @ejscribner
thank you

ejscribner commented 1 year ago

Hey @oaikaoz, we've released v2.3.4 that includes this change. Thanks so much for being a part of the Ottoman community!