Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1900

Impossibility to override built-in SQL functions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Git Master
    • Fix Version/s: 2.3
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None
    • Environment:
      Any

      Description

      Doctrine doesn't allow to to create own SQL function for DQL if that function is already defined as "built-in". An example could be custom DATE_ADD implementation.
      Method FunctionDeclaration() in Doctrine\ORM\Query\Parser gives higher priority to built-in SQL functions, even if they are not
      usable for a specific situation, and registering of own datetime function doesn't help. This issue makes it impossible to use some advanced Doctrine extensions,
      for example https://github.com/beberlei/DoctrineExtensions that provide fuller implementations.
      Considering the fact that someone may want to use ready components provided by the community, and being new to Doctrine can't figure out the way to hack
      or workaround this, the issue is a major one.

        Activity

        lex0r Alex Oroshchuk created issue -
        lex0r Alex Oroshchuk made changes -
        Field Original Value New Value
        Description If someone wants to create own SQL function for DQL (for example custom DATE_ADD implementation) Doctrine doesn't allow to do that.
        Method {{FunctionDeclaration()}} in _Doctrine\ORM\Query\Parser_ gives higher priority to built-in SQL functions, even if they are not
        usable for a specific situation. Registering own datetime function doesn't help either. This issue makes it impossible to use some advanced Doctrine extensions,
        for example https://github.com/beberlei/DoctrineExtensions.
        Considering the fact that someone may want to use ready components provided by the community, and being new to Doctrine can't figure out the way to hack
        or workaround this, the issue is a major one.
        Doctrine doesn't allow to to create own SQL function for DQL if that function is already defined as "built-in". An example could be custom {{DATE_ADD}} implementation.
        Method {{FunctionDeclaration()}} in _Doctrine\ORM\Query\Parser_ gives higher priority to built-in SQL functions, even if they are not
        usable for a specific situation, and registering of own datetime function doesn't help. This issue makes it impossible to use some advanced Doctrine extensions,
        for example https://github.com/beberlei/DoctrineExtensions that provide fuller implementations.
        Considering the fact that someone may want to use ready components provided by the community, and being new to Doctrine can't figure out the way to hack
        or workaround this, the issue is a major one.
        beberlei Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        lex0r Alex Oroshchuk made changes -
        Resolution Won't Fix [ 2 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        beberlei Benjamin Eberlei made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Fix Version/s 2.3 [ 10185 ]
        Resolution Fixed [ 1 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira [ 13810 ] jira-feedback [ 15694 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15694 ] jira-feedback2 [ 17558 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17558 ] jira-feedback3 [ 19816 ]

          People

          • Assignee:
            beberlei Benjamin Eberlei
            Reporter:
            lex0r Alex Oroshchuk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: