FindAndCount issue when use cache #1406

Closed
opened 2 years ago by no-bibi · 0 comments
no-bibi commented 2 years ago (Migrated from github.com)
Owner
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 2 years ago
lunny modified the milestone from 1.1.1 to 1.0.1 2 years ago
lunny closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.