Skip to content

Commit

Permalink
Fix issue with relation queries with RelatedWhere
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenafamo committed Oct 16, 2024
1 parent 5660ca7 commit 4ff14db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gen/templates/models/09_rel_query.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ func (os {{$tAlias.UpSingular}}Slice) {{relQueryMethodName $tAlias $relAlias}}(c
{{- end}}
{{- range $where := $side.FromWhere}}
{{- $fromCol := index $from.Columns $where.Column}}
sm.Where({{$from.UpSingular}}Columns.{{$fromCol}}.EQ({{$.Dialect}}.Arg({{quote $where.SQLValue}}))),
{{$from.UpSingular}}Columns.{{$fromCol}}.EQ({{$.Dialect}}.Arg({{quote $where.SQLValue}})),
{{- end}}
{{- range $where := $side.ToWhere}}
{{- $toCol := index $to.Columns $where.Column}}
sm.Where({{$to.UpSingular}}Columns.{{$toCol}}.EQ({{$.Dialect}}.Arg({{quote $where.SQLValue}}))),
{{$to.UpSingular}}Columns.{{$toCol}}.EQ({{$.Dialect}}.Arg({{quote $where.SQLValue}})),
{{- end}}
),
{{- else -}}
Expand Down

0 comments on commit 4ff14db

Please sign in to comment.