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
{{ message }}
Repository navigation
Confusing Field Naming in Many-to-Many Relationship Documentation #8252
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.
Activity