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
When adding a many2many relationship between models. If one of them has a check constraint, GORM tries to copy it over to the joinTable, where it won't work, since the constraint has a different name for the column (i.e.: email -> user_email)
GORM Playground Link
go-gorm/playground#731
Description
When adding a many2many relationship between models. If one of them has a check constraint, GORM tries to copy it over to the joinTable, where it won't work, since the constraint has a different name for the column (i.e.:
email
->user_email
)I'd expect this constraint to either be optionally ignored at schema/relationship.go:
or possibly allow users to be able to set the checks on the new reference columns in the struct tags of the field with the many2many relationship.
The text was updated successfully, but these errors were encountered: