Many-to-many association #37
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: thereadme/hapi-sequelize-crud#37
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello, I have these two associations defined
Team.belongsToMany(Project, {through: 'TeamProjects})
Project.belongsToMany(Team, {through: 'TeamProjects})
This is the error that I got. It looks like routes with the same path are added more than once and is rejected by Hapi. I'm not sure if I'm doing something wrong. Please help. Thanks
Could you please post your entire models definitions and plugin registration code?
Sure, here they are.
team.js
player.js
index.js
package.json
@lmd2692 You are right, it was a bug, I published the new version as
hapi-sequelize-crud@2.9.2
.@joeybaker I just saw your commit
83eadf0929
and reverted my commit to respect yours.The problem was that the forEach loop was processing join table models as well (e.g.
TeamPlayers
) which would cause duplicate CRUD creation for models. This seems to fix the issue.