Closed waltermvp closed 4 years ago
Hi @waltermvp
You can create a predicate for the id
field as a function and pass it to the DataStore instance
e.g.
const predicate = c => c.id('eq', '1bc3907d-7a2b-4703-8683-fef0cbc6a7f1');
const modelInstance = DataStore.query(Model, predicate);
@manueliglesias thank you
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Which Category is your question related to? Datastore, API
What AWS Services are you utilizing? AppSync, DynamoDB
Provide additional details e.g. code snippets
When attempting to use static method
createForId
ofModelPredicateCreator
in datastore Predicates I get the following error:This is how I tried to call the
createForId
constructor:You can see the full class here