SQLite :: Unable to read sql view which has aggregate functions
I have strange error when trying read view (SQlLite) whith aggregate functions to QSqlRelationalTableModel.
QSqlRelationalTableModel->select() failed with message:
"no such column: group_concat(trolleybus.id) Unable to execute statement"
Similar error occurred when i try replace/link foreign key to show column "group_concat(trolleybus.id)" in QSqlRelation.
@CREATE VIEW [view_maintenance_trolleybus] AS
SELECT maintenance.id, maintenance.name, group_concat(trolleybus.id)
LEFT OUTER JOIN
maintenance.id = trolleybus.maintenance_id
GROUP BY maintenance.id;@
Same SELECT works as intended in QSqlQueryModel.
Qt: 4.8, Windows, msv2010