It is observed that the JDatabaseQuery::unionAll() method creates a JDatabaseQueryElement named unionAll see JDatabaseQuery::unionAll() which is never utilized when converting the JDatabaseQuery object to a real string query see JDatabaseQuery::__toString().
This results in an incorrect query string.
The unit test case uses Reflection class to get the value of unionAll element, which is not sufficient. Test case should be made as realistic as possible. see JDatabaseQueryTest::unionAllUnion()
There are multiple possible ways we can fix this, therefore I wanted to discuss it before making a PR.
It is observed that the
JDatabaseQuery::unionAll()method creates aJDatabaseQueryElementnamedunionAllsee JDatabaseQuery::unionAll() which is never utilized when converting the JDatabaseQuery object to a real string query see JDatabaseQuery::__toString().This results in an incorrect
querystring.The unit test case uses
Reflectionclass to get the value ofunionAllelement, which is not sufficient. Test case should be made as realistic as possible. see JDatabaseQueryTest::unionAllUnion()There are multiple possible ways we can fix this, therefore I wanted to discuss it before making a PR.