Details
Description
I know that is a very complex feature,
But would be nice if doctrine DQL get supports for the operator 'new' like hibernate.
http://docs.jboss.org/hibernate/core/4.0/hem/en-US/html/queryhql.html#queryhql-select
class User
{
/**
* @Id @Column(type="integer")
* @GeneratedValue
*/
public $id;
/**
* @Column()
*/
public $name;
/**
* @Column()
*/
public $email;
// some code
}
class UserVO
{
public function __construct($name, $email)
{
/// some code
}
}
//DQL : SELECT new UserVO(u.name, u.email) FROM User u;
RELATED :
DDC-1729
It might be even rather simple to implement, but I don't see the use-case tbh.