dynamoose: [BUG] TypeMismatch: Expected createdAt to be of type date, instead found type object
Summary:
CloudWatch log

Doc on Dynamodb

Code sample:
Schema
const dynamoose = require("dynamoose");
const schema = new dynamoose.Schema({
email: {
type: String,
hashKey: true
},
github: Object,
name: String
}, {
saveUnknown: true,
timestamps: true
});
module.exports = dynamoose.model('User', schema);
General
const { User } = require('../db');
const user = await User.query('email').eq(email).exec();
Current output and behavior (including stack trace):
Cant query from dynamodb
Expected output and behavior:
I should be able to query from Dynamodb when I pass the pk value
Environment:
Operating System: NA - Lambda Function
Operating System Version: NA
Node.js version (node -v): v10.19.0
NPM version: (npm -v): 6.14.8
Dynamoose version: 2.3.0
Other:
- [x ] I have read through the Dynamoose documentation before posting this issue
- [x ] I have searched through the GitHub issues (including closed issues) and pull requests to ensure this issue has not already been raised before
- I have searched the internet and Stack Overflow to ensure this issue hasn’t been raised or answered before
- [x ] I have tested the code provided and am confident it doesn’t work as intended
- I have filled out all fields above
- I am running the latest version of Dynamoose
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (8 by maintainers)
@AllanOricil Right now I don’t have enough information to be able to reproduce this and debug it.
Just for context. I ran the following code.
And got the following result:
From my perspective, everything is working fine. Please submit an MCVE as described in the contribution guidelines so I can debug this further.