I'll give a shot at this although I'm certainly not a Doctrine2 expert.
From my (limited) usage and testing it seems Doctrine may give you a related object without loading the data for that object. At that point public properties will break lazy loading.
Doctrine is lazy loading at the point where the persisted data is requested, not when the object that contains persisted data is requested.
Update: I took a look at the actual proxy code and it seems my original understanding was mostly correct. The proxy object doesn't load itself until a method of the object is called. So any request to a public property would not load the data.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…