Jira issue originally created by user @FabioBatSilva:
I know that is a very complex feature,
But would be nice if doctrine DQL get supports for the operator 'new' like hibernate.
* @Id @Column(type="integer")
// some code
public function **construct($name, $email)
/// some code
//DQL : SELECT new UserVO(u.name, u.email) FROM User u;
Comment created by @beberlei:
It might be even rather simple to implement, but I don't see the use-case tbh.
Comment created by @FabioBatSilva:
This is a well-known hibernate feature, this is very usefull when need to use value/transfer objects whit values from many entities or aggregate functions.
Instead of having a array result from a complex selec with many joins and agragations the result would be used into a simple value object.
I would like to create this feature if some one could give me some tips about the best way to implement this.
I think the added complexity should not be done before we have value object support in hydrators.
The code to touch here is:
Please do not attempt this now, i am very unsure about this yet.
I agree with you, we have others important features to do.
Any way I think that would be a usefull feature.
I'll be waiting. :)
Fixed by : 13762f2
Issue was closed with resolution "Fixed"