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

        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!)

          People

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

            Dates

            • Created:
              Updated: