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

Storing dates differently during create vs update in MongoDB #216

Closed
elier opened this issue Jul 29, 2023 · 2 comments
Closed

Storing dates differently during create vs update in MongoDB #216

elier opened this issue Jul 29, 2023 · 2 comments
Labels

Comments

@elier
Copy link

elier commented Jul 29, 2023

Describe the bug
When an entity with a date attribute is created, the date is stored as an object: { "$date" : 1688702400000 }.
However, when the entity is updated, the date is stored as a string: "2023-07-29T13:46:26.037Z".
The date attributes of the object (entity) being passed to remult.repo().insert() and remult.repo().update() are date instances, according to what I see in the console.

Therefore, it looks like the insert and the update are handling the date differently, not sure if it is remult or mongodb.

Screenshots
image
image

Versions

"mongodb": "^5.3.0"
"remult": "^0.22.1"
@noam-honig
Copy link
Collaborator

Thanks for that, fixed it for version 0.22.2, can you please check?

@noam-honig noam-honig added the bug label Jul 30, 2023
@elier
Copy link
Author

elier commented Jul 30, 2023

Fixed, thanks!

@elier elier closed this as completed Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants