mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-578: Entity proxy classes don't respect reference returning #710
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (May 7, 2010).
Jira issue originally created by user jantichy:
Hello, I have entity class containing a method that returns reference:
But when Doctrine creates it's proxy class, the reference ampersand in the proxy class disappears:
It causes incompatibility of the proxy class and unexpected behaviour of the method.
Solution:
Here is the solution, could you please include it to the Doctrine code?
The Doctrine\ORM\Proxy\ProxyFactory should be fixed - in method _generateMethods() there is following line:
It should be replaced by something like this:
Thank you for the fix!
@doctrinebot commented on GitHub (May 10, 2010):
Comment created by shurakai:
Fixed in http://github.com/Shurakai/doctrine2 & sent pull request. Should be fixed in trunk soon.
Thanks for reporting!
@doctrinebot commented on GitHub (May 11, 2010):
Comment created by romanb:
Note though that since php5 the only remaining usecase for returning by reference I can think of are arrays, and this is a very weird thing to do.
@doctrinebot commented on GitHub (May 11, 2010):
Issue was closed with resolution "Fixed"