Skip to content

Loading…

DDC-1729: Translate queries into graphs of value objects (instead of array hydration?) #2378

Open
doctrinebot opened this Issue · 1 comment

2 participants

@doctrinebot

Jira issue originally created by user @beberlei:

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.

@doctrinebot

Comment created by @beberlei:

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!)
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.x milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.