Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None
    • Environment:
      It doesn't matter.

      Description

      Doctrine can't quote (` character) collumn and table names. Hundreds of times I use doctrine I have same problem, errors in queries becouse of using names like in sql language, for example table name `group`, collumn name `order`. It is very annoying. I cant change collumn/table names it is used by other systems I have no influence on them. Doctine becomes unusable.

        Activity

        Hide
        Marco Pivetta added a comment -

        You can use a custom quoting strategy or the technique described at http://docs.doctrine-project.org/en/latest/reference/basic-mapping.html#quoting-reserved-words to achieve this.

        Doctrine does not fix bad naming decisions.

        Show
        Marco Pivetta added a comment - You can use a custom quoting strategy or the technique described at http://docs.doctrine-project.org/en/latest/reference/basic-mapping.html#quoting-reserved-words to achieve this. Doctrine does not fix bad naming decisions.
        Hide
        Pawel Len added a comment -

        Ok, thx. I have just written GraveAccentQuoteStrategy class and it works good.

        But I have to tell You that you should not say "Doctrine does not fix bad naming decisions." becouse my sytuation is that I am writting system for telecommunication company and they have their own databases and many other applications created by third party companies witch use this databases and they were created aprox 5-15 years ago so it wasnt my desicion Doctrine is a tool that helps - not causes problems
        Btw. Good job thanx for QuoteStrategy option !

        Show
        Pawel Len added a comment - Ok, thx. I have just written GraveAccentQuoteStrategy class and it works good. But I have to tell You that you should not say "Doctrine does not fix bad naming decisions." becouse my sytuation is that I am writting system for telecommunication company and they have their own databases and many other applications created by third party companies witch use this databases and they were created aprox 5-15 years ago so it wasnt my desicion Doctrine is a tool that helps - not causes problems Btw. Good job thanx for QuoteStrategy option !
        Hide
        Christophe Coevoet added a comment -

        The default quoting strategy supports using quoted names by specifying it in the mapping. so you don't even need to create a custom strategy most of the time.

        and Marco never said it was you taking the bad decision

        Show
        Christophe Coevoet added a comment - The default quoting strategy supports using quoted names by specifying it in the mapping. so you don't even need to create a custom strategy most of the time. and Marco never said it was you taking the bad decision

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Pawel Len
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: