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
This is fine behaviour by default, but a problem arises when attempting to use a DB engine that doesn't support group_concat (i.e. Postgres or SQL Server) or when attempting to do more complex select queries, such as summing a column on all the related records.
A new property, selectAutoConcat(open to suggestions for better names) should so that the current behaviour can be disabled by the developer when they want to handle those more advanced use cases.
The text was updated successfully, but these errors were encountered:
Hmm, I would probably say that once this is implemented #5424 would become unnecessary since you could just write out that SQL yourself. Seems like it might be a bit too magical to implement #5424. @bennothommo any thoughts?
For complex scenarios like this, it should be handled by a custom column select using the list extension feature. It's basically the same thing and select acts as a defacto helper for this
In https://github.com/octobercms/october/blob/develop/modules/backend/widgets/Lists.php#L502-L504 the
select
property of a column that references arelation
with multiple associated record is automatically wrapped in agroup_concat()
call to automatically concatenate all of the results of the select query into a comma separated string.This is fine behaviour by default, but a problem arises when attempting to use a DB engine that doesn't support group_concat (i.e. Postgres or SQL Server) or when attempting to do more complex
select
queries, such as summing a column on all the related records.A new property,
selectAutoConcat
(open to suggestions for better names) should so that the current behaviour can be disabled by the developer when they want to handle those more advanced use cases.The text was updated successfully, but these errors were encountered: