From dfe7a68053b20b59bd92f83da20943af22519772 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Wed, 19 Feb 2014 22:02:07 +0100 Subject: [PATCH] Removing notice about public properties support (included since 2.4) see doctrine/doctrine2#406 --- docs/en/reference/best-practices.rst | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docs/en/reference/best-practices.rst b/docs/en/reference/best-practices.rst index f58291d18..6937e99b1 100644 --- a/docs/en/reference/best-practices.rst +++ b/docs/en/reference/best-practices.rst @@ -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 -------------------------------------------