-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repair searchPlusScope #2
Comments
You're right, thank you. Currently, searchPlusScope is not perfect and can be rewritten using your own scenario,welcome to share |
Fix that the count cannot be output correctlyrepair func (m *default{{.CamelName}}Model) Count(ctx context.Context, cond *{{.CamelName}}Query) (total int64, err error) {
err = m.conn(ctx).Scopes(
searchPlusScope(cond.SearchPlus, m.table),
).Where(cond.{{.CamelName}}).Count(&total).Error
return total, err
} |
repaired and update searchPlusScope |
this's a great repaired |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
question
Condition cannot be output correctly
repair
The text was updated successfully, but these errors were encountered: