+
Skip to content

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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载