-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
Description
Such as the usage of xorm get in models/attachment.go, if the id or uuid is empty, the query sql will be no where: select ... from attachment limit 1. The query will not be an error, but the query result could be not the result you want.
I suppose we use xorm get by this way:
attach := new(Attachment)
has, err := engine.Where("id=?", id).Get(attach)
Screenshots
Metadata
Metadata
Assignees
Labels
No labels