Previously, {one,many}-to-many relationships with models would result in associationNames that were plural. e.g. Team might have many players
and one location. The validation was expecting to see the plural Players and the singular Location but Sequelize is expecting the
singular Player (Location worked fine). This meant that include lookups
would silently fail. This fixes the problem in a backward- compatible way.
It continues to allow include=Location (capitalized) for backward-
compatibility. And now allows and actually does the lookup for include=players, include=player, include=Player, include=Players
lookup relationships.
There are also a few small changes that enable the above.
I'm working on a separate PR that adds integration tests so that we can ensure this kind of thing doesn't happen again.
Previously, {one,many}-to-many relationships with models would result in
`associationNames` that were plural. e.g. `Team` might have many players
and one location. The validation was expecting to see the plural
`Players` and the singular `Location` but Sequelize is expecting the
singular `Player` (`Location` worked fine). This meant that include lookups
would silently fail. This fixes the problem in a backward- compatible way.
It continues to allow `include=Location` (capitalized) for backward-
compatibility. And now allows and actually does the lookup for
`include=players`, `include=player`, `include=Player`, `include=Players`
lookup relationships.
There are also a few small changes that enable the above.
I'm working on a separate PR that adds integration tests so that we can ensure this kind of thing doesn't happen again.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Previously, {one,many}-to-many relationships with models would result in
associationNamesthat were plural. e.g.Teammight have many playersand one location. The validation was expecting to see the plural
Playersand the singularLocationbut Sequelize is expecting thesingular
Player(Locationworked fine). This meant that include lookupswould silently fail. This fixes the problem in a backward- compatible way.
It continues to allow
include=Location(capitalized) for backward-compatibility. And now allows and actually does the lookup for
include=players,include=player,include=Player,include=Playerslookup relationships.
There are also a few small changes that enable the above.
I'm working on a separate PR that adds integration tests so that we can ensure this kind of thing doesn't happen again.
cc @mdibaiee
@joeybaker: Thanks Joey! Looks fine to me 👍
Released as 2.7.1