mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Quoting problems with schema and dots in table name mapping #6031
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 @guilliamxavier on GitHub (Aug 1, 2018).
Test entity:
Test code:
Full results:
Recap (
masteris simpler):2.6(current stable):Issues:
name="`other-b`.foo"andschema="`other-b`", name="foo"generateSELECT ... FROM `other-b`.foo(invalid SQL)and one must do
name="other-b.`foo`"orschema="other-b", name="`foo`"to get aFROM "other-b"."foo"(which is still not exactly the wantedFROM "other-b".foo)name="`foo.x`"generatesSELECT ... FROM `foo.x`(invalid SQL)and there is no way to get a
FROM "foo.x"name="other.`foo.x`"generatesSELECT ... FROM "other"."foo"."x"andschema="other", name="`foo.x`"generatesSELECT ... FROM other.x`(invalid SQL)Thoughts:
name="`other-b`.foo"andschema="`other-b`", name="foo"would generate aFROM "other-b".foowhile
name="other.`foo-a`"andschema="other", name="`foo-a`"would generate aFROM other."foo-a"name="`foo.x`"would generate aFROM "foo.x"(
name="other.foo"andschema="other", name="foo"still generating aFROM other.foo)name="other.`foo.x`"andschema="other", name="`foo.x`"would generate aFROM other."foo.x"master(future3.0):Issues:
name="foo.x"generatesSELECT ... FROM "foo"."x"and there is no way to get a
FROM "foo.x"schema="other.y", name="foo.x"generatesSELECT ... FROM "other"."y"."foo"."x"and there is no way to get a
FROM "other.y"."foo.x"Thoughts:
name="myschema.mytable"), and quote the (explicit) schema and the name separately:name="foo.x"would generate aFROM "foo.x"(
schema="other", name="foo"still generating aFROM "other"."foo")schema="other.y", name="foo.x"would generate aFROM "other.y"."foo.x"(and no place anymore for a
FROM "other"."y"."foo"."x")What do you think?
History of the features:
2.2?): https://github.com/doctrine/doctrine2/issues/1979 (and the 2 commits linked in comments near the end)schemaattribute: since2.5: https://github.com/doctrine/doctrine2/pull/881 (and the 3 issues referenced at the bottom)3.0@guilliamxavier commented on GitHub (Aug 10, 2018):
Additional info for
master: it looks like support of implicit schema has been "implicitly" dropped in8a4ca55e8b(search for'.'[2 occurrences] and forimplicit_schema[6 occurrences])