This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.
Get ignores varchar(max) conditions for MSSQL #523
Labels
Milestone
From go-gitea/gitea#697
It appears that
has, err := x.Get(&PublicKey{ Content: content, Type: KeyTypeUser, })
Where content is of type
varchar(max)
. The content query condition is ignored. This ends up checking on the type condition, and returning incorrect values.MSSQL does support querying on text columns. Eg the below works
has, err := x.Where("content=?",content).Where("type=?",KeyTypeUser).Get(&PublicKey{})
Go-xorm should either support that in the "bean" or error out if it is not supported. Silently dropping it leads to unexpected results.
The text was updated successfully, but these errors were encountered: