FindAndCount issue when use cache #1406

Closed
opened 2019-08-27 08:08:13 +00:00 by no-bibi · 0 comments
no-bibi commented 2019-08-27 08:08:13 +00:00 (Migrated from github.com)
rsa := make([]Game, 0)
rsb := make([]Game, 0)

an, _ := RDB.Limit(10, 0).FindAndCount(&rsa)
bn, _ := RDB.Limit(10, 10).FindAndCount(&rsb )

1.SELECT count(*) FROM "tablename" WHERE "_id" IN ($1,$2) []interface {}{"1", "2"}
FindAndCount include "id in (xxx,xxx)" as default condition,so an or bn is not right.

2.rsb will not get any data ,err is [cacheFind] cache no hit:tablename[id]

``` rsa := make([]Game, 0) rsb := make([]Game, 0) an, _ := RDB.Limit(10, 0).FindAndCount(&rsa) bn, _ := RDB.Limit(10, 10).FindAndCount(&rsb ) ``` 1.SELECT count(*) FROM "tablename" WHERE "_id" IN ($1,$2) []interface {}{"1", "2"} FindAndCount include "id in (xxx,xxx)" as default condition,so **an** or **bn** is not right. 2.**rsb** will not get any data ,err is [cacheFind] cache no hit:tablename[id]
lunny added this to the 1.1.1 milestone 2020-03-13 09:01:06 +00:00
lunny modified the milestone from 1.1.1 to 1.0.1 2020-03-23 12:55:17 +00:00
lunny closed this issue 2020-03-23 14:38:05 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 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#1406
No description provided.