Select from Combine
Jarkaruus opened this issue · 3 comments
Jarkaruus commented
Bug Report
Q | A |
---|---|
Version(s) | 2.12.0 |
Summary
Writing the code below I obtain this error. If I create a workaround to class Combine, I obtain a wrong query like
SELECT * FROM "( (SELECT * FROM table1) UNION (SELECT * FROM table12 UNION (SELECT * FROM table3) ) "AS i
Current behavior
'PHP message: PHP Recoverable fatal error: Object of class Laminas\\Db\\Sql\\Combine could not be converted to string laminas/laminas-db/src/Adapter/Platform/AbstractPlatform.php
on line 75'
How to reproduce
$select = new Select();
$select->from(['i' => $combine]);
Expected behavior
I expect a query like SELECT * FROM ( (SELECT * FROM table1) UNION (SELECT * FROM table12 UNION (SELECT * FROM table3) ) AS i