mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7330 from silverstripe/pulls/fix-hasone-docs
Fix incorrect $has_one documentation
This commit is contained in:
commit
526cff4e55
@ -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')"
|
||||
|
Loading…
Reference in New Issue
Block a user