Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-624

Partial object query that leaves out an association to avoid loading it fetches the association anyway.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.x
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      Assuming:

      Customer <onetoone> Cart

      where Cart is the owning side.

      Since the association from Customer to Cart can not be lazy, it would make sense to leave out the association in a query to avoid loading the carts like this:

      select partial c.{id,name, ... anything except cart} from Customer c"
      

      But this is ignored and the carts of all customers are fetched anyway. Query::HINT_FORCE_PARTIAL_LOAD is an alternative solution, however it has the disadvantage that it disables lazy-loading for all queried objects. If partial querying would honor associations this would allow more fine-grained control.

        Issue Links

          Activity

          Roman S. Borschel created issue -
          Roman S. Borschel made changes -
          Field Original Value New Value
          Affects Version/s 2.0-BETA1 [ 10030 ]
          Priority Minor [ 4 ] Major [ 3 ]
          Hide
          Roman S. Borschel added a comment -

          Might need to be pushed back to a 2.0.x / 2.x.x bugfix release. Not clear yet.

          Show
          Roman S. Borschel added a comment - Might need to be pushed back to a 2.0.x / 2.x.x bugfix release. Not clear yet.
          Roman S. Borschel made changes -
          Fix Version/s 2.0-RC1 [ 10091 ]
          Fix Version/s 2.0 [ 10021 ]
          Benjamin Eberlei made changes -
          Fix Version/s 2.1 [ 10022 ]
          Fix Version/s 2.0-RC1 [ 10091 ]
          Benjamin Eberlei made changes -
          Fix Version/s 2.x [ 10090 ]
          Fix Version/s 2.1 [ 10022 ]
          Alexander made changes -
          Link This issue is duplicated by DDC-1465 [ DDC-1465 ]
          Benjamin Eberlei made changes -
          Workflow jira [ 11442 ] jira-feedback [ 13853 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback [ 13853 ] jira-feedback2 [ 15717 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback2 [ 15717 ] jira-feedback3 [ 17974 ]
          Guilherme Blanco made changes -
          Assignee Roman S. Borschel [ romanb ] Guilherme Blanco [ guilhermeblanco ]

          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-624, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

            • Assignee:
              Guilherme Blanco
              Reporter:
              Roman S. Borschel
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: