We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dynamoose force nested object of array to have the same type instead of one of the valid type individually
const model = dynamoose.model('test', { arr: [{ type: Array, schema: [{ type: Object, schema: { foo: [Number, dynamoose.type.NULL] } }] }, dynamoose.type.NULL] }); // Pass await new model({ arr: [{ foo: 1 }, { foo: 2 }] }).conformToSchema({ customTypesDynamo: true, checkExpiredItem: true, saveUnknown: true, modifiers: ['get'], type: 'fromDynamo', }) // Pass await new model({ arr: [{ foo: null }, { foo: null }] }).conformToSchema({ customTypesDynamo: true, checkExpiredItem: true, saveUnknown: true, modifiers: ['get'], type: 'fromDynamo', }) // Should pass but Throw Invalid TypeMismatch: Expected arr.1.foo to be of type number, instead found type null. await new model({ arr: [{ foo: 1 }, { foo: null }] }).conformToSchema({ customTypesDynamo: true, checkExpiredItem: true, saveUnknown: true, modifiers: ['get'], type: 'fromDynamo', }) console.info('Pass')
Operating System: Ubuntu 23.04 Node.js version (node -v): v18.17.0 Dynamoose version: 3.2.0
node -v
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary:
Dynamoose force nested object of array to have the same type instead of one of the valid type individually
Code sample:
Environment:
Operating System: Ubuntu 23.04
Node.js version (
node -v
): v18.17.0Dynamoose version: 3.2.0
Other:
The text was updated successfully, but these errors were encountered: