Skip to content

Reserved word Condition is not escaped on insert #6284

Open
@whyte624

Description

@whyte624

Bug Report

Q A
Version 3.7.1

Summary

I had a table with column with name condition.
Migration generated correctly with quotes around word "condition".
Howerver, on insert there was an error.

An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition, userId, managerId discr) VALUES (' at line 1"

Current behaviour

Error on insert.

How to reproduce

Create table with column condition. Try to insert with ORM or DBAL.

Expected behaviour

Column should be escaped properly.

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