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
Hello,
i have a problem with the instance returned by the query operation (also with get op):
const store: DynamoStore<OrderModel> = new DynamoStore<OrderModel>(OrderModel);
const getOrder = await store
.query()
.index(indexName)
.wherePartitionKey(order.storeOrderId)
.whereSortKey().eq(order.selectedStoreId)
.execSingle();
my expectation was that the type of the object returned from the above query should be the one declared during the store definition, but i'm getting a simply js Object instead of an OrderModel, any idea?
Thank you.
The text was updated successfully, but these errors were encountered:
Hi @mattia85
This is how the library is supposed to work, we don't create instances of the provided model class. So an instanceof check will always return false. The model class is only defined for metadata purposes, any business logic should be provided in pure helper methods.
Hello,
i have a problem with the instance returned by the query operation (also with get op):
my expectation was that the type of the object returned from the above query should be the one declared during the store definition, but i'm getting a simply js Object instead of an OrderModel, any idea?
Thank you.
The text was updated successfully, but these errors were encountered: