From acc58c2b689f334bf754b23af80a27976f55b216 Mon Sep 17 00:00:00 2001 From: Matt Peel Date: Fri, 1 Sep 2017 00:48:07 +1200 Subject: [PATCH] Fix incorrect $has_one documentation The first mention of `$has_one` and `$db` in this file is incorrect, which is misleading. It's explained properly later on in the document, but it's easy to get it wrong based on this first code snippet. --- docs/en/04_Changelogs/4.0.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index c7d907f8e..a8a342958 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -861,10 +861,11 @@ In cases where image-only assets may be assigned to relationships then your data an `Image` datatype, or refer to `DBFile('image/supported')`. ```php +use SilverStripe\Assets\Image; class MyObject extends SilverStripe\ORM\DataObject { private static $has_one = [ - "ImageObject" => "Image" + "ImageObject" => Image::class ]; private static $db = [ "ImageField" => "DBFile('image/supported')"