Skip to content
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

Handle readonly public properties, cf. #954 #999

Open
wants to merge 1 commit into
base: 3.4.x
Choose a base branch
from

Conversation

alessandromorelli
Copy link

Attempting to fix #954

This fixes the handling of readonly public properties by unsetting them and thus making them available for intercept by the magic methods. Cloning, serialization and deserialization are handled accordingly.

When instantiating a proxy object, the readonly properties are unset from the scope of the proxy parent class, allowing them to be initialized by the proxy factory and, later, the persister.

This paves the way to allow lazy loading in the presence of readonly public properties.

To fully support readonly public properties, the ProxyFactory cloner implementation and the UnitOfWork createEntity method must account for them, avoiding repeat initializations.

This fixes the handling of readonly public properties by unsetting them and thus making them available for intercept by the magic methods.
Cloning, serialization and deserialization are handled accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Public readonly properties are unset in Proxy's constructor
1 participant