diff --git a/pkg/datastore/gormstore/operations.go b/pkg/datastore/gormstore/operations.go
index 87b456f..0d5b66d 100644
--- a/pkg/datastore/gormstore/operations.go
+++ b/pkg/datastore/gormstore/operations.go
@@ -56,7 +56,7 @@ func (env *Operations) Delete(ctx context.Context, id int32) error {
 
 func (env *Operations) CountSince(ctx context.Context, owner int64, since int64) (int64, error) {
 	var count int64
-	if err := env.db.Where("owner = ? AND created_at > ?",owner,since).Count(&count).Error; err != nil {
+	if err := env.db.Model(&model.Operation{}).Where("owner = ? AND created_at > ?",owner,since).Count(&count).Error; err != nil {
 		return count, err
 	}