[DDC-1072] Private property mapping can cause issues, suggest changing to protected Created: 17/Mar/11  Updated: 17/Mar/11

Status: Open
Project: Doctrine 2 - ORM
Component/s: Documentation
Affects Version/s: 2.0.2
Fix Version/s: None
Security Level: All

Type: Documentation Priority: Major
Reporter: Kevin Bradwick Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None
Environment:

not applicable



 Description   

The documentation recommends using private variables in entities. This can be problematic on entities with relations when using caching drivers as the proxy objects cannot access private variables and so the caching driver can throw notices like

...apc_store(): "_id" returned as member variable from __sleep() but
does not exist in ...

Making member variables protected resolves this issue when caching is enabled.

This information would be helpful on the documentation so others can be made aware of this issue. We spent a few days trying to debug the issue before understanding exactly what was going on.


Generated at Mon Dec 22 15:02:22 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.