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

Closed
opened 2026-01-22 13:43:20 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 27, 2012).

Originally assigned to: @beberlei on GitHub.

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.

Originally created by @doctrinebot on GitHub (Mar 27, 2012). Originally assigned to: @beberlei on GitHub. 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.
admin added the New Feature label 2026-01-22 13:43:20 +01:00
admin closed this issue 2026-01-22 13:43:20 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 9, 2012):

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!)
@doctrinebot commented on GitHub (Jun 9, 2012): 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](http://www.doctrine-project.org/jira/browse/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!)
Author
Owner

@beberlei commented on GitHub (Dec 5, 2020):

returning view models from DQL was implementd in Doctrine 2.4 I believe.

@beberlei commented on GitHub (Dec 5, 2020): returning view models from DQL was implementd in Doctrine 2.4 I believe.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2175