mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Column not quoted in ManyToOne relation #5370
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @andynador on GitHub (Dec 29, 2016).
Originally assigned to: @ostrolucky on GitHub.
In Postgres I have tables
firmwith fieldfirmIdandcardwith fieldfirmId. When I try to write relation and load related data, I got error -column firmid does not exist. Looks like related column not quoted in SQL-query. Could anyone help, how I can fix problem? Definition on relations:@sgrodzicki commented on GitHub (Dec 30, 2016):
Facing the same issue (also with PostgreSQL). Imagine the following schema:
The entities look like this:
and
Running a simple query with the query builder:
runs the following query:
In this case
userGroupIdshould be quoted!@sgrodzicki commented on GitHub (Jan 3, 2017):
@Ocramius do you think this is a bug and should be fixed within Doctrine or is it simply not supported (like square brackets in table names) due to driver abstraction?
@Ocramius commented on GitHub (Jan 3, 2017):
@sgrodzicki seems like a bug in ORM: yet another one related with postgres+case sensitivity+quoting.
I would suggest designing a test case for it, and it should (in theory) pass both with and without manual join column definitions in the mappings.
@ostrolucky commented on GitHub (Aug 7, 2018):
In Doctrine 3.x, everything is quoted by default, which solves this issue