mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
50a0018363
```php class HomePage extends Page { private static $many_many = [ 'HeroImages' => [ 'through' => PageImageLink::class, 'from' => 'Page', 'to' => 'Image', ] ]; } ``` ```php class PageImageLink extends DataObject { private static $has_one = [ 'Page' => SiteTree::class, 'Image' => Image::class, ]; } This fails because the linking object's relation class doesn't exactly match the owner. Sharing the linking objects across various entries in the ancestry should be a supported use case. Co-authored-by: Aaron Carlino <unclecheese@leftandmain.com> |
||
---|---|---|
.. | ||
Control | ||
Core | ||
Dev | ||
Forms | ||
i18n | ||
Logging | ||
ORM | ||
Security | ||
View |