Removing notice about public properties support (included since 2.4)
see doctrine/doctrine2#406
This commit is contained in:
parent
5a2497d482
commit
dfe7a68053
@ -6,22 +6,6 @@ design generally refer to best practices when working with Doctrine
|
|||||||
and do not necessarily reflect best practices for database design
|
and do not necessarily reflect best practices for database design
|
||||||
in general.
|
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
|
Constrain relationships as much as possible
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user