I'd like to find ways around many issues on Doctrine Proxy Serialization. At the moment I have solved:
-Proxy lazy loading aggregates (registering another callback in the autoloader at runtime when fails) -Notices on serialization after __sleep call: Changing private to protected Now I'm stucked at __construct initialization operations like instantiate ArrayCollection, etc. Proxies do not call parent __construct, Therefore, proxy objects are not in the same initial state as parents. Thanks in advance! On Thursday, May 10, 2012 10:11:14 PM UTC+2, Benjamin Eberlei wrote: > > What additional optimizations do you want to implement? We could add them > to core. > > But generally this code is very critical, so we don't want users to modify > it, because the generation is private API of Doctrine. > > On Thu, May 10, 2012 at 9:48 PM, Jasper N. Brouwer > <[email protected]<javascript:> > > wrote: > >> You could extend the EntityManager and pass whatever you want to it, >> including your own derived ProxyFactory class: >> http://www.doctrine-project.org/api/orm/2.2/class-Doctrine.ORM.Proxy.ProxyFactory.html >> >> >> The property is private, so when extending I'll have to override every >> method that uses it, or use reflection to set its value. Both options are >> not very clean imo. Personally I rarely use private properties/methods >> because of these kind of issues. >> >> In this case I think I will not extend the EntityManager, but use >> reflection to set my custom ProxyFactory during the bootstrap phase of my >> app. >> >> -- >> Jasper N. Brouwer >> >> -- >> You received this message because you are subscribed to the Google Groups >> "doctrine-user" group. >> To post to this group, send email to [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/doctrine-user?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
