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
It would be nice if this library could somehow identify Date strings (perhaps ISO 8601) and automatically convert to a date when deserializing from the DB to Node.js.
Another thought is that Date objects could be converted to a special object before being saved to help the deserialization back to a Date process.
I think that's too much for this plugin to handle, its purpose is solely stringify/parse JSON columns on save/fetch. Also I don't understand the database engines date representation reference, the least we could do is to parse back a Javascript Date object, since what is stored is always a stringified JSON object.
I suggest to handle that on saving and fetched hooks of your models.
@ricardogama The reason for the DB date representation reference is so the plugin can identify what values to parse back into a Date object. Just having a string would make it difficult to know what fields to convert back into a Date.
I'm closing this since you are not interested in including the feature.
It would be nice if this library could somehow identify
Date
strings (perhaps ISO 8601) and automatically convert to a date when deserializing from the DB to Node.js.Another thought is that
Date
objects could be converted to a special object before being saved to help the deserialization back to aDate
process.RethinkDB represents dates like so:
I believe MongoDB represents dates like so:
Thoughts?
The text was updated successfully, but these errors were encountered: