Closed pabloos closed 2 years ago
Hello @pabloos,
This is a good question. Honestly, I'm not familiar with the usage of Association
. As far as I know, Paginator will dynamically append cursor information into db query through Where
chaining, but Association
doesn't seem to support this ability.
I have two ideas for your reference:
DB
field on Association
, which has the type *gorm.DB
. I'm not sure if this DB
keeps all the settings for the query and associations added before. Maybe you can give it a try to see if it works.Please let me know if any of these ideas solves your situations 🙂
I would close this issue first. Feel free to reopen it for further discussion 😃
Is there any way to paginate gorm associations? Associations also uses Find to query for results, but the type isn't compatible (as the Paginate method requires a gorm.DB).