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
Currently EntityManager.find() allows for querying against an LSI/GSI by specifying the desired index in the queryOptions. As getting a single item by LSI is a common use case in our consuming code, it would be much easier if this method supported it.
One potential wrinkle for this request is that findOne() currently requires the primary key, and in this instance the sort key is going to be unknown (hence the index query). findOne() signature might need to be updated to PrimaryKey | PartitionKey based on queryOptions.index !== undefined.
The text was updated successfully, but these errors were encountered:
Typedorm should not support findOne() for LSI/GSI because DynamoDB does not allow single-item retrieval using these indexes. The findOne() method is optimized for primary key queries, and including index support would conflict with DynamoDB's inherent functionality and potentially confuse users.
The GetItem and BatchGetItem operations can't be used on a local secondary index.
Currently
EntityManager.find()
allows for querying against an LSI/GSI by specifying the desired index in thequeryOptions
. As getting a single item by LSI is a common use case in our consuming code, it would be much easier if this method supported it.One potential wrinkle for this request is that
findOne()
currently requires the primary key, and in this instance the sort key is going to be unknown (hence the index query).findOne()
signature might need to be updated toPrimaryKey
|PartitionKey
based onqueryOptions.index !== undefined
.The text was updated successfully, but these errors were encountered: