Skip to content

Confusing Field Naming in Many-to-Many Relationship Documentation #8252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
k-allagbe opened this issue Feb 15, 2025 · 0 comments
Open

Confusing Field Naming in Many-to-Many Relationship Documentation #8252

k-allagbe opened this issue Feb 15, 2025 · 0 comments

Comments

@k-allagbe
Copy link

k-allagbe commented Feb 15, 2025

Describe the content issue:

The documentation for modeling a many-to-many relationship in the Next.js guide might be confusing. The tags field in the Post model and the posts field in the Tag model are defined as a.hasMany('PostTag', 'postId') and a.hasMany('PostTag', 'tagId'), respectively. However, these fields reference the PostTag model rather than directly referencing Tag or Post. This could mislead developers into thinking they are directly retrieving related Tag or Post records, when they are actually retrieving PostTag entries.

A clearer naming convention or additional explanation in the documentation would help avoid confusion.

URL page where content issue is:

https://docs.amplify.aws/nextjs/build-a-backend/data/data-modeling/relationships/#model-a-many-to-many-relationship

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant