Closed applejag closed 2 years ago
CHANGELOG.md
SafeSQLName
.Where
In GORM:
db.Where("name IN ?", []any{"a", "b", "c"})
Is a shortcut for:
db.Where(db.Raw("name IN ?", []any{"a", "b", "c"}))
But that only works if the first argument is a string.
It was not a string, it was a SafeSQLName, which was based on a string, but that didn't GORM understand.
Now SafeSQLName is a type alias instead of it's own type, so reflection doesn't see them as different types.
CHANGELOG.md
file, according to docs: https://iver-wharf.github.io/#/development/changelogs/writing-changelogsSummary
SafeSQLName
messing up GORM.Where
statementsMotivation
In GORM:
Is a shortcut for:
But that only works if the first argument is a string.
It was not a string, it was a
SafeSQLName
, which was based on a string, but that didn't GORM understand.Now
SafeSQLName
is a type alias instead of it's own type, so reflection doesn't see them as different types.