Skip to content

JDatabaseQuery::__toString() does not utilize unionAll query element #7970

@izharaazmi

Description

@izharaazmi

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions