Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      Different dbs have different reserved words. I started my project with mysql where i couldnt name my table as "order". After changing to postgre it turned out that "user" is reserved. Although

      ALTER TABLE "member" RENAME TO "user";

      works.

      I know i could use prefixes in yml eg

      Com\ApiBundle\Entity\User:
          type: entity
          table: prefix_user
      

      but
      -i build my db
      -automatically generate my yaml files from it
      -then i generate the entities

      If i have prefixed table names my entities will have them too.
      Besides doctrine is a layer on top of different dbs, it would be nice not to worry about reserved words when i naming my tables.

      What is your opinion on this feature.

        Activity

        Hide
        Steve Müller added a comment -

        Benjamin Horn this looks more like a DBAL related issue. Can you please give more details how the broken SQL is created by you? Also please provide information about which DBAL and/or ORM version you are referring to as we have fixed a lot of quotation problems with DDL statements in current DBAL master over the last few months. So please also try using the latest master and see if you can reproduce the issue.
        If the issue still persists it would be helpfult to know which database vendor and which version you are using (as different vendors and versions have different reserved keywords).

        Show
        Steve Müller added a comment - Benjamin Horn this looks more like a DBAL related issue. Can you please give more details how the broken SQL is created by you? Also please provide information about which DBAL and/or ORM version you are referring to as we have fixed a lot of quotation problems with DDL statements in current DBAL master over the last few months. So please also try using the latest master and see if you can reproduce the issue. If the issue still persists it would be helpfult to know which database vendor and which version you are using (as different vendors and versions have different reserved keywords).

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Horn
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: