Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2123

[GH-502] Fix for invalid 'double-ON' SQL generation with entity inheritance type JOINED.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.1
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      This issue is created automatically through a Github pull request on behalf of gwis:

      Url: https://github.com/doctrine/doctrine2/pull/502

      Message:

      In SqlWalker::walkJoin(), SqlWalker::walkRangeVariableDeclaration() can be
      called which may produce an 'ON' clause if the entity inheritance type is
      JOINED. As walkJoin() may then produce another ON clause, this results in
      invalid SQL (e.g. '... ON foo = bar ON (baz = quux) ...' when the inheritance
      type is JOINED.

      This adds a test and a fix for the problem, by checking for an inheritance type
      of JOINED in walkJoin() and using AND instead of ON in the appropriate place.

      It seems like this part of the code is begging to be refactored. This is my
      first foray into Doctrine internals and can't see a way to do this without
      stomping all over the rest of the code, but this section seems ripe for cleanup
      by somebody who is familiar.

        Activity

        Benjamin Eberlei created issue -
        Hide
        Benjamin Eberlei added a comment -

        A related Github Pull-Request [GH-502] was closed
        https://github.com/doctrine/doctrine2/pull/502

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-502] was closed https://github.com/doctrine/doctrine2/pull/502
        Show
        Fabio B. Silva added a comment - Merged : https://github.com/doctrine/doctrine2/commit/7a895209e3d9912bcc44fc8e8635dd48164a4749
        Fabio B. Silva made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Fix Version/s 2.3.1 [ 10323 ]
        Hide
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-502] was closed:
        https://github.com/doctrine/dbal/pull/502

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-502] was closed: https://github.com/doctrine/dbal/pull/502

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-2123, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

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

            Dates

            • Created:
              Updated:
              Resolved: