1
0
mirror of synced 2025-02-20 22:23:14 +03:00

Removing notice about public properties support (included since 2.4)

see doctrine/doctrine2#406
This commit is contained in:
Marco Pivetta 2014-02-19 22:02:07 +01:00
parent 5a2497d482
commit dfe7a68053

View File

@ -6,22 +6,6 @@ design generally refer to best practices when working with Doctrine
and do not necessarily reflect best practices for database design
in general.
Don't use public properties on entities
---------------------------------------
It is very important that you don't map public properties on
entities, but only protected or private ones. The reason for this
is simple, whenever you access a public property of a proxy object
that hasn't been initialized yet the return value will be null.
Doctrine cannot hook into this process and magically make the
entity lazy load.
This can create situations where it is very hard to debug the
current failure. We therefore urge you to map only private and
protected properties on entities and use getter methods or magic
\_\_get() to access them.
Constrain relationships as much as possible
-------------------------------------------