[BUG]FindAndCount not not support .Cols("aa","bbb") #1793

Closed
opened 2020-09-14 14:13:47 +00:00 by RelicOfTesla · 2 comments
db.Cols("aa","bbb").Where("xxx=?",1).FindAndCount(...)

// SELECT `aa`,`bbb` FROM `task` WHERE xxx=?
// SELECT count(`aa`,`bbb`) FROM `task` WHERE xxx=?  // bad


```go db.Cols("aa","bbb").Where("xxx=?",1).FindAndCount(...) // SELECT `aa`,`bbb` FROM `task` WHERE xxx=? // SELECT count(`aa`,`bbb`) FROM `task` WHERE xxx=? // bad ```
RelicOfTesla changed title from [BUG}FindAndCount not not support .Cols("aa","bbb") to [BUG]FindAndCount not not support .Cols("aa","bbb") 2020-09-14 14:13:55 +00:00

是的,只能回退到0.8.3版本了

是的,只能回退到0.8.3版本了
lunny added the
kind
bug
label 2020-11-05 07:04:50 +00:00
Owner

You can use Select("aa,bb") instead of Cols.

You can use `Select("aa,bb")` instead of `Cols`.
lunny added this to the 1.0.6 milestone 2020-11-05 07:10:47 +00:00
lunny closed this issue 2020-11-09 04:23:15 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1793
No description provided.