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
I have Postgres and ManyToMany relation. I can't remove email attribute, because if i remove it, i get an error from through model: Unhandled rejection TypeError: Cannot set property 'user_roles' of undefined.
Without group: ['role.name'] I get Unhandled rejection SequelizeDatabaseError: column "role.name" must appear in the GROUP BY...
If I let it be, it says column "users.email" must appear in the GROUP BY...))
If I add "users.email" to group it hits with Unhandled rejection SequelizeDatabaseError: column "users.user_roles.createdAt" - as it did not remove through attributes((
And in the end, when I have group: ['role.name', 'users.email', "users.user_roles.createdAt", "users.user_roles.updatedAt", "users.user_roles.userEmail", "users.user_roles.roleName" ]. It makes a fatality with Unhandled rejection TypeError: Cannot set property 'user_roles' of undefined
The text was updated successfully, but these errors were encountered:
Your issue with removing email should be fixed as of master, but yes there was a bug with it.
That bug likely effectively stops you from going forward since you need to remove all regular attributes.
I have tried all options, mentioned in Issue#222, but still have some problems with my code:
I have Postgres and ManyToMany relation. I can't remove
email
attribute, because if i remove it, i get an error from through model:Unhandled rejection TypeError: Cannot set property 'user_roles' of undefined
.Without
group: ['role.name']
I getUnhandled rejection SequelizeDatabaseError: column "role.name" must appear in the GROUP BY...
If I let it be, it says
column "users.email" must appear in the GROUP BY...
))If I add "users.email" to group it hits with
Unhandled rejection SequelizeDatabaseError: column "users.user_roles.createdAt"
- as it did not remove through attributes((And in the end, when I have
group: ['role.name', 'users.email', "users.user_roles.createdAt", "users.user_roles.updatedAt", "users.user_roles.userEmail", "users.user_roles.roleName" ]
. It makes a fatality withUnhandled rejection TypeError: Cannot set property 'user_roles' of undefined
The text was updated successfully, but these errors were encountered: