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
Hi! First of all, thank you for maintaining the best ORM/ODM for NodeJS 馃檪
While migrating a project from v5 to v6, I noticed some inconsistencies with persisting JSON properties.
Using bisection, I've identified that version 5.6.10 introduced a regression/bug. I'm not sure which commit precisely, but you can find the list here.
The issue is the following: When updating a JSON property using assign(), the change is not persisted in the database.
While digging a bit more, I discovered that the __originalEntityData wrapper property is also updated with assign(), thus preventing the changeset from being computed at commit time.
More info:
When updating the property with a brand new object, it works. The issue is only present with assign().
I confirmed the issue with the MongoDB driver but not with the SQLite driver, it seems to work fine with SQLite.
Describe the bug
Hi! First of all, thank you for maintaining the best ORM/ODM for NodeJS 馃檪
While migrating a project from v5 to v6, I noticed some inconsistencies with persisting JSON properties.
Using bisection, I've identified that version 5.6.10 introduced a regression/bug. I'm not sure which commit precisely, but you can find the list here.
The issue is the following: When updating a JSON property using
assign()
, the change is not persisted in the database.While digging a bit more, I discovered that the
__originalEntityData
wrapper property is also updated withassign()
, thus preventing the changeset from being computed at commit time.More info:
assign()
.Reproduction
Here is a test case to reproduce the issue: https://github.com/alexandre-abrioux/mikro-orm-issue-5158
What driver are you using?
@mikro-orm/mongodb
MikroORM version
6.0.5
Node.js version
18.18.0
Operating system
No response
Validations
The text was updated successfully, but these errors were encountered: