Support for loose coupled duplicated column names for aggregators #34097
Unanswered
rafallyczkowski
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
For aggregate selects it's forbidden to have a duplicated column names.
[2020-09-01 18:59:47] local.ERROR: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'description' (SQL: ... at /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671)
Steps To Reproduce:
Execute this query.
Motivation
When using a repositories design patter, we are having criteria that build a query based on the data in the specific criteria,
we don't check on this level agains existing columns. I believe array_unique could be executed on the columns just before sending a query. It does not affect any column select aliases.
Beta Was this translation helpful? Give feedback.
All reactions