Skip to content

Writer for UNION queries should not reset the placeholder counter #95

Closed
@chrisberl

Description

@chrisberl

When using UNION queries with placeholders (e.g. when using setValueAsColumn in the belonging SELECT queries), the placeholder counter will be reset currently. Because of this, the placeholders of a previous SELECT query inside a UNION will be overwritten when having placeholders in more than one SELECT.

In my opinion it should be enough to change the writer call in NilPortugues\Sql\QueryBuilder\Builder\Syntax\AbstractSetWriter::abstractWrite() and add a second parameter with false value:
$selects[] = $this->writer->write($select, false);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions