Skip to content

Commit

Permalink
Use correct type for sub list paginate and filter templates (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-doubez authored Jun 15, 2023
1 parent b35fc7b commit 023625b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
{{ define "ogent/ogent/helper/list/sub" }}{{/* gotype: entgo.io/ent/entc/gen.typeScope */}}
q := h.client.{{ $.Type.Name }}.Query().Where({{ $.Type.Package }}.IDEQ(params.{{ $.Type.ID.StructField }})).Query{{ $.Scope.Edge.Name | pascal }}()
{{- with eagerLoad $.Type "list" }}{{ . }}{{ end }}
{{- template "ogent/ogent/helper/list/paginate" $.Type -}}
{{- if hasTemplate "ogent/ogent/helper/list/filter" }}{{ template "ogent/ogent/helper/list/filter" $.Type }}{{ end -}}
{{- template "ogent/ogent/helper/list/paginate" $.Scope.Edge.Type -}}
{{- if hasTemplate "ogent/ogent/helper/list/filter" }}{{ template "ogent/ogent/helper/list/filter" $.Scope.Edge.Type }}{{ end -}}
es, err := q.All(ctx)
{{-
template "ogent/ogent/helper/error"
Expand Down

0 comments on commit 023625b

Please sign in to comment.