Skip to content

Commit

Permalink
fix: count without offset in FindByPage
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Mar 8, 2022
1 parent a66b286 commit 574b433
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/template/method.go
Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ func ({{.S}} {{.NewStructName}}Do) FindByPage(offset int, limit int) (result []*
return
}
count, err = {{.S}}.Count()
count, err = {{.S}}.Offset(-1).Limit(-1).Count()
return
}

0 comments on commit 574b433

Please sign in to comment.