Skip to content

Entity aliases should be prefixed to avoid reserved word collisions #4194

@jfxninja

Description

@jfxninja
$I->seeInRepository(
        'OrderItem',
        array(
            'order' => array(
                'recipient_email'=> self::MEMBER_EMAIL
            )
        )
    );

Generates the following query:

SELECT s FROM OrderItem s INNER JOIN s.order order WHERE order.recipient_email = :order__recipient_email

This fails with expected literal since due to the use of order as an alias.

Suggest prefixing the alias to generate the following

SELECT s FROM OrderItem s INNER JOIN s.order _order WHERE _order.recipient_email = :_order__recipient_email

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions