From 109a9da3afcd24d154179dde07989de608f6db73 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 9 Apr 2008 11:28:32 +0000 Subject: [PATCH] Merged revisions 50265 via svnmerge from svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq ........ r50265 | ischommer | 2008-02-27 15:18:45 +1300 (Wed, 27 Feb 2008) | 1 line documentation ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52412 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataObjectDecorator.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/model/DataObjectDecorator.php b/core/model/DataObjectDecorator.php index 4586c8bf6..938cd4342 100755 --- a/core/model/DataObjectDecorator.php +++ b/core/model/DataObjectDecorator.php @@ -74,6 +74,12 @@ abstract class DataObjectDecorator extends Extension { * * Return a map where the keys are db, has_one, etc, and the values are * additional fields/relations to be defined. + * + * Note: please ensure that the static variable that you are overloading is explicitly defined on the class that + * you are extending. For example, we have added static $has_one = array() to the Member definition, so that we + * can add has_one relationships to Member with decorators. + * + * If you forget to do this, db/build won't create the new relation. Don't blame us, blame PHP! ;-) * * @return array Returns a map where the keys are db, has_one, etc, and * the values are additional fields/relations to be defined.