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.
This commit is contained in:
Matt Peel 2017-09-01 00:48:07 +12:00 committed by GitHub
parent 76f2358f3b
commit acc58c2b68

View File

@ -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')"