New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDC-1574 - "new" operator #422
Conversation
That is awesome! Much less awefull mapping! |
), $token); | ||
} | ||
|
||
$class = new \ReflectionClass($className); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might wanna add?
if (!$class->isInstantiable()) { error }
Could you add passing of whole entity?
|
$class = $cache[$key]['class']; | ||
$argIndex = $cache[$key]['argIndex']; | ||
$objIndex = $cache[$key]['objIndex']; | ||
$value = $cache[$key]['type'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline the type conversion (do not use 2 lines)
Done !!! Thanks @guilhermeblanco |
What about the passing of whole entity? Does it work? |
I dont get the use cases, could any one post some? |
It would be great to support SELECT
new CustomerDTO(c, e.email, a.city)
FROM
Customer c
JOIN
u.email e
JOIN
u.address a
ORDER BY
u.name |
http://www.doctrine-project.org/jira/browse/DDC-1574
Hi guys.
This path adds support for "new" operator
Usage :
Any simple class with a constructor could be used
but for the first version just scalar values are allowed.
it's a big patch, so any sugestion are welcome.
Thanks.