Merge pull request #7330 from silverstripe/pulls/fix-hasone-docs

Fix incorrect $has_one documentation
This commit is contained in:
Loz Calver 2017-08-31 14:00:59 +01:00 committed by GitHub
commit 526cff4e55

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