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
The range key needs to be provided when calling Model.get even in circumstances where it is deterministic. This behavior is inconsistent with Model.create. I suspect this also applies to the hash key as well but I haven't tried it.
Current output and behavior (including stack trace):
ValidationException: The number of conditions on the keys is invalid
at throwDefaultError (node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js:8:22)
at deserializeAws_json1_0GetItemCommandError (node_modules/@aws-sdk/client-dynamodb/dist-cjs/protocols/Aws_json1_0.js:1740:51)
at node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24
at node_modules/@aws-sdk/middleware-signing/dist-cjs/middleware.js:14:20
at node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/middleware-retry/dist-cjs/retryMiddleware.js:27:46
at node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:5:22
at main (node_modules/dynamoose/dist/aws/ddb/internal.js:6:20)
at node_modules/dynamoose/dist/Model/index.js:771:34
Expected output and behavior:
MyModel.get should return the persisted object without requiring that the SK field is passed in
Environment:
Operating System: MacOS
Operating System Version: 13.4
Node.js version (node -v): 18.x
NPM version: (npm -v): 9.5.1
Dynamoose version: 3.x
Other:
I have read through the Dynamoose documentation before posting this issue
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
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
The text was updated successfully, but these errors were encountered:
Summary:
The
range key
needs to be provided when callingModel.get
even in circumstances where it is deterministic. This behavior is inconsistent withModel.create
. I suspect this also applies to thehash key
as well but I haven't tried it.Code sample:
Schema
Model
General
Current output and behavior (including stack trace):
Expected output and behavior:
MyModel.get
should return the persisted object without requiring that theSK
field is passed inEnvironment:
Operating System: MacOS
Operating System Version: 13.4
Node.js version (
node -v
): 18.xNPM version: (
npm -v
): 9.5.1Dynamoose version: 3.x
Other:
The text was updated successfully, but these errors were encountered: