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
I am also experiencing the same problem. When you call model.create you get a different object then when you call model.get for the same id. Happens when you are using get and set methods to transform data.
Summary:
If you have a schema containing an attribute like:
and create a document using the derived model like:
Then
m.someDate
is anumber
.If later you get the document with:
Then
m2.someDate
is aDate
.According to this Slack thread https://dynamoose.slack.com/archives/CG4B7RL8N/p1621584884007300 , it should always be a
Date
.I think the issue is
conformToSchema
is called in theget
code path, but not in thecreate
one.Environment:
Operating System: MacOS
Operating System Version: Big Sur 11.2.3
Node.js version (
node -v
): v15.14.0NPM version: (
npm -v
): 6.14.13Dynamoose version: 2.7.3
Other:
Thanks !
The text was updated successfully, but these errors were encountered: