Skip to content

QueryBuilder cannot combine union parts with CTE #7318

@Bilge

Description

@Bilge

Bug Report

Q A
Version 4.4.1
Previous Version if the bug is a regression n/a

Summary

A query with union parts cannot also have a CTE (with) expression.

Current behavior

$query->with('cte', $cte)->union($alfa)->addUnion($bravo)->getSQL();

This returns a union with no CTE.

Expected behavior

The CTE should be present in the output.

How to reproduce

As above.

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