Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongodb driver doesn't detect deep updates #5572

Closed
5 tasks done
briankchan opened this issue May 15, 2024 · 1 comment
Closed
5 tasks done

Mongodb driver doesn't detect deep updates #5572

briankchan opened this issue May 15, 2024 · 1 comment

Comments

@briankchan
Copy link

Describe the bug

Changes in nested objects are not detected when flushing with the mongodb driver. (The same test seems to work fine with the sqlite driver, though.)

Reproduction

https://github.com/briankchan/mikro-orm-bug-mongodb-deep

What driver are you using?

@mikro-orm/mongodb

MikroORM version

tested on 6.2.2 and 6.2.7-dev.0

Node.js version

v20.12.2

Operating system

No response

Validations

@B4nan
Copy link
Member

B4nan commented May 15, 2024

Interesting, thanks for a failing repro, I remember several cases like this and this one might be the first valid case actually.

Workaround for now is to reassign the whole object value:

usr2.a = { b: 100 };

@B4nan B4nan closed this as completed in 577166a May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants