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
Mysql processes this query without any problems, but in case of Postgresql I'm getting an error:
column "id" must appear in the GROUP BY clause or be used in an aggregate function
That's because your package adds extra select elements.* and Postgresql works in such way, that I need to specify, what to do with each selected field.
The text was updated successfully, but these errors were encountered:
Same problem seems to be adding table.* on the query even though you already have table.* on your select. It is in sql server. On Mysql it is doing fine
I've just found out that this will also be an issue when doing union queries
This package is selecting all columns on all select statements in union queries, making the column numbers do not agree if we're union-ing different tables with different column numbers.
Exception thrown:
SQLSTATE[21000]: Cardinality violation: 1222 The used SELECT statements have a different number of columns
Example of generated query:
(select A, B, table1.*from table1) # table1 has 3 columnsunion
(select A, B, table2.*from table2) # table2 has 4 columns
Temporary workaround is to use Laravel's query builder (DB class) instead of table's model when doing unions.
I'm using Postgresql and have the following code:
Mysql processes this query without any problems, but in case of Postgresql I'm getting an error:
That's because your package adds extra select
elements.*
and Postgresql works in such way, that I need to specify, what to do with each selected field.The text was updated successfully, but these errors were encountered: