Skip to content

Commit a8e9b09

Browse files
committed
Merge branch 'inoc603/refactor_eager_load_columns' into dev
2 parents 65ff249 + 47521a4 commit a8e9b09

File tree

5 files changed

+22
-10
lines changed

5 files changed

+22
-10
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Versioning](http://semver.org/spec/v2.0.0.html).
2424

2525
## [v4.2.0] - 2020-07-03
2626

27+
### Added
28+
2729
- Add types.DecimalContext to control the context with which new decimals
2830
are created. This is important if your application uses a special context
2931
with more precision or requires the Go operating mode for example.

drivers/sqlboiler-mssql/driver/bindata.go

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

drivers/sqlboiler-psql/driver/bindata.go

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templatebin/bindata.go

+8-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/09_relationship_to_many_eager.go.tpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ func ({{$ltable.DownSingular}}L) Load{{$relAlias.Local}}({{if $.NoContext}}e boi
5555

5656
{{if .ToJoinTable -}}
5757
{{- $schemaJoinTable := .JoinTable | $.SchemaTable -}}
58+
{{- $foreignTable := getTable $.Tables .ForeignTable -}}
5859
query := NewQuery(
59-
qm.Select("{{$schemaForeignTable}}.*, {{id 0 | $.Quotes}}.{{.JoinLocalColumn | $.Quotes}}"),
60+
qm.Select("{{$foreignTable.Columns | columnNames | prefixStringSlice (print $schemaForeignTable ".") | join ", "}}, {{id 0 | $.Quotes}}.{{.JoinLocalColumn | $.Quotes}}"),
6061
qm.From("{{$schemaForeignTable}}"),
6162
qm.InnerJoin("{{$schemaJoinTable}} as {{id 0 | $.Quotes}} on {{$schemaForeignTable}}.{{.ForeignColumn | $.Quotes}} = {{id 0 | $.Quotes}}.{{.JoinForeignColumn | $.Quotes}}"),
6263
qm.WhereIn("{{id 0 | $.Quotes}}.{{.JoinLocalColumn | $.Quotes}} in ?", args...),

0 commit comments

Comments
 (0)