You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And it cause ERROR #42803 column "turn.id" must appear in the GROUP BY clause or be used in an aggregate function because
turn.id has different values.
Possible Solution
Steps to Reproduce
Query on a table tableA with .Group() and tableA has a foreign key towards tableB
Wrap result in 1 as a table newTable
Call .Relation("tableB") on the new table
Context (Environment)
Detailed Description
I want Relation function only select in the new table, DO NOT add those columns to the select statement in the wrapped table.
Possible Implementation
The text was updated successfully, but these errors were encountered:
Relation function generated wrong sql statement after WrapWith.
I wrote code like this:
Expected Behavior
I want to get something like this:
Current Behavior
go-pg generated sql statment below:
And it cause
ERROR #42803 column "turn.id" must appear in the GROUP BY clause or be used in an aggregate function
becauseturn.id has different values.
Possible Solution
Steps to Reproduce
tableA
with.Group()
andtableA
has a foreign key towardstableB
newTable
.Relation("tableB")
on the new tableContext (Environment)
Detailed Description
I want
Relation
function only select in the new table, DO NOT add those columns to the select statement in the wrapped table.Possible Implementation
The text was updated successfully, but these errors were encountered: