Skip to content

DataStore m:n code example is broken #5157

@david-mcafee

Description

@david-mcafee

Describe the content issue:
A clear and concise description of what the content issue is. Is there content missing or is there incorrect content?
The following code example does not work, as editor is not a field on the model:

await DataStore.save(
  new PostEditor({
    post: post,
    editor: editor
  })
);

Instead, the example should be as follows:

await DataStore.save(
  new PostEditor({
    post: post,
    user: editor
  })
);

URL page where content issue is:
https://docs.amplify.aws/lib/datastore/relational/q/platform/js/#many-to-many-relationships

Metadata

Metadata

Labels

DataStoreDocumentation dealing with the DataStore, can be for any/all platform(s)amplify/dataIssue related to aws-amplify/amplify-category-apip2incorrect info. ie a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions