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

"You may have observed that in a mixed result, the object always ends up on index 0 of a result row."

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.4
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      The DQL reference at

      http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html

      defines that

      "You may have observed that in a mixed result, the object always ends up on index 0 of a result row."

      I find this too important to state it in such a parenthetic way.

      The reordering is counterintuitive behaviour at its worst, and grossly in violation of the principle of least astonishment. I bet noone would even guess that this could be intended behaviour. I would not consider this a classic bug, as it is documented behaviour, but as a way of deliberately doing it wrong, making mixed results totally counterintuitive to use. From a usability standpoint, this is as bad as it gets.

      I cannot think of any convincing reason why the ORM should decide on its own, and without any notice, to change the explicitly specified ordering from the select list, because it is absolutely confusing and IMO there is no advantage at all in doing so.

      I explicitly told Doctrine 2 to put the entity element on position 3, so why should it end up at position 0 without further notice? If position 0 is a must (which I do not think it should be), then the user should not be able to specify entity elements at any other position than that. As long as other positions are permissible, I would rather have the element stay at the exact position declared, and not be shuffled around.

        Issue Links

          Activity

          dalvarez Daniel Alvarez Arribas created issue -
          dalvarez Daniel Alvarez Arribas made changes -
          Field Original Value New Value
          Description
          The DQL reference at

          http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html

          defines that

          "You may have observed that in a mixed result, the object always ends up on index 0 of a result row."

          I find this too important to state it in such a parenthetic way.


          The reordering is counterintuitive behaviour at its worst, and grossly in violation of the principle of least astonishment. I bet noone would even guess that this could be intended behaviour. I would not consider this a classic bug, as it is documented behaviour, but as a way of deliberately doing it wrong, making mixed results totally counterintuitive to use. From a usability standpoint, this is as bad as it gets.

          I cannot think of any convincing reason why the ORM should decide on its own, and without any notice, to change the explicitly specified ordering from the select list, because it is absolutely confusing and IMO there is no advantage at all in doing so.

          I explicitly told Doctrine 2 to put the entity element on position 3, so why should it end up at position 0 without further notice? If position 0 is a must (which I do not think it should be), then the user should not be able to specify entity elements at any other position than that. As long as other positions are permissible, I would rather have the element stay at the exact position declared, and not be shuffled around.
          The DQL reference at

          http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html

          defines that

          "You may have observed that in a mixed result, the object always ends up on index 0 of a result row."

          I find this too important to state it in such a parenthetic way.


          The reordering is counterintuitive behaviour at its worst, and grossly in violation of the principle of least astonishment. I bet noone would even guess that this could be intended behaviour. I would not consider this a classic bug, as it is documented behaviour, but as a way of deliberately doing it wrong, making mixed results totally counterintuitive to use. From a usability standpoint, this is as bad as it gets.

          I cannot think of any convincing reason why the ORM should decide on its own, and without any notice, to change the explicitly specified ordering from the select list, because it is absolutely confusing and IMO there is no advantage at all in doing so.

          I explicitly told Doctrine 2 to put the entity element on position 3, so why should it end up at position 0 without further notice? If position 0 is a must (which I do not think it should be), then the user should not be able to specify entity elements at any other position than that. As long as other positions are permissible, I would rather have the element stay at the exact position declared, and not be shuffled around.
          beberlei Benjamin Eberlei made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0.3 [ 10117 ]
          Resolution Fixed [ 1 ]
          beberlei Benjamin Eberlei made changes -
          Fix Version/s 2.0.4 [ 10130 ]
          Fix Version/s 2.0.3 [ 10117 ]
          dalvarez Daniel Alvarez Arribas made changes -
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          dalvarez Daniel Alvarez Arribas made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          beberlei Benjamin Eberlei made changes -
          Assignee Benjamin Eberlei [ beberlei ] Guilherme Blanco [ guilhermeblanco ]
          beberlei Benjamin Eberlei made changes -
          Link This issue relates to DDC-1424 [ DDC-1424 ]
          beberlei Benjamin Eberlei made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira [ 12526 ] jira-feedback [ 14816 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira-feedback [ 14816 ] jira-feedback2 [ 16680 ]
          beberlei Benjamin Eberlei made changes -
          Workflow jira-feedback2 [ 16680 ] jira-feedback3 [ 18933 ]

            People

            • Assignee:
              guilhermeblanco Guilherme Blanco
              Reporter:
              dalvarez Daniel Alvarez Arribas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: