Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1154

Proxies should take convention while loading *ToOne associations to reduce 1 extra query


    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:


      Read the IRC log:

      [2:38pm] guilhermeblanco: beberlei: ping
      [2:38pm] guilhermeblanco: I'm curious about a feature if Doctrine supports
      [2:38pm] guilhermeblanco: if we do this on a proxy:
      [2:38pm] guilhermeblanco: $proxy->getOneToOneAssoc()
      [2:39pm] guilhermeblanco: shouldn't Doctrine already populate the assoc entity?
      [2:39pm] guilhermeblanco: it would be an inner join
      [2:39pm] beberlei: how would doctrine know it needs it?
      [2:39pm] guilhermeblanco: beberlei: it always repass the ClassMetadata to Persister
      [2:40pm] guilhermeblanco: so all needed item is to also pass the fieldname/assocname
      [2:40pm] beberlei: but how would doctrine know getOneToOneASsoc() really returns this assoc
      [2:40pm] beberlei: it could contain any logic
      [2:40pm] guilhermeblanco: it wouldn't... but as soon as we trigger __load($fieldName)
      [2:40pm] guilhermeblanco: we know that we could populate not only the Proxy, but also assoc
      [2:40pm] beberlei: by convention?
      [2:40pm] guilhermeblanco: ya
      [2:41pm] beberlei: sounds good, can you open a ticket?
      [2:41pm] guilhermeblanco: getUser() would trigger __load('user')
      [2:41pm] guilhermeblanco: sure!
      [2:41pm] guilhermeblanco: I'll pastie this as content... it would be awesome to have
      [2:41pm] guilhermeblanco: I see a lot of queries here that could be optimized 


        Guilherme Blanco created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 12642 ] jira-feedback [ 13926 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13926 ] jira-feedback2 [ 15790 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15790 ] jira-feedback3 [ 18047 ]

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

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


          • Assignee:
            Benjamin Eberlei
            Guilherme Blanco
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: