From 164edd7df3c38756147dea88df9165d9f705b5be Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Mon, 8 Jan 2018 14:10:11 +1300 Subject: [PATCH] DOCS Correct docs on polymorphic dataobject usage Fixes #7732 --- docs/en/02_Developer_Guides/00_Model/02_Relations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/02_Developer_Guides/00_Model/02_Relations.md b/docs/en/02_Developer_Guides/00_Model/02_Relations.md index 36661aa98..c6933e2a7 100644 --- a/docs/en/02_Developer_Guides/00_Model/02_Relations.md +++ b/docs/en/02_Developer_Guides/00_Model/02_Relations.md @@ -69,7 +69,7 @@ This is useful where there could be many use cases for a particular data structu An additional column is created called "``Class", which along with the ID column identifies the object. -To specify that a has_one relation is polymorphic set the type to 'DataObject'. +To specify that a has_one relation is polymorphic set the type to [api:SilverStripe\ORM\DataObject] Ideally, the associated has_many (or belongs_to) should be specified with dot notation. ```php @@ -94,7 +94,7 @@ class Fan extends DataObject // Generates columns FanOfID and FanOfClass private static $has_one = [ - "FanOf" => "DataObject" + "FanOf" => DataObject::class, ]; } ```