Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1729

Translate queries into graphs of value objects (instead of array hydration?)

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.x
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      In decoupled applications the model layer returns "data-transfer-objects" through the boundary into the controller/view layer. It would make sense to have Doctrine directly generate any data-transfer/value-object from native and dql queries.

        Activity

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

        Example:

        $dql = "SELECT new CustomerAddressView(c.id, c.name, a.id, a.street, a.number, a.city, a.code)
                     FROM Customer c INNER JOIN c.address a WHERE c.id = ?1";
        

        This supersedes DDC-1819.

        1. One additional property in ResultSetMapping => $viewModelClass?
        2. Changes to Parser (new ... syntax)
        3. Changes to sQL Walker?
        4. Changes to Hydration (Only object hydration!)

        Show
        Benjamin Eberlei added a comment - Example: $dql = "SELECT new CustomerAddressView(c.id, c.name, a.id, a.street, a.number, a.city, a.code) FROM Customer c INNER JOIN c.address a WHERE c.id = ?1"; This supersedes DDC-1819 . 1. One additional property in ResultSetMapping => $viewModelClass? 2. Changes to Parser (new ... syntax) 3. Changes to sQL Walker? 4. Changes to Hydration (Only object hydration!)
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 13564 ] jira-feedback [ 14038 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14038 ] jira-feedback2 [ 15902 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15902 ] jira-feedback3 [ 18157 ]

        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-1729, 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:
            0 Start watching this issue

            Dates

            • Created:
              Updated: