silverstripe-framework/tests/php
Guy Sartorelli 50a0018363
FIX many_many through should allow subclasses (#11230)
```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>
2024-05-13 14:15:37 +12:00
..
Control MNT Remove TODO comments 2023-10-30 13:21:09 +13:00
Core FIX Allow double dots in path when not attempting directory traversal (#11219) 2024-05-06 13:15:26 +12:00
Dev Merge branch '5.1' into 5 2024-01-23 12:04:23 +13:00
Forms Merge branch '5.1' into 5.2 2024-03-19 23:26:25 +00:00
i18n FIX Handle __TRAIT__ in i18nTextCollector 2024-02-13 16:33:24 -07:00
Logging Merge branch '4' into 5.0 2023-03-30 13:20:03 +13:00
ORM FIX many_many through should allow subclasses (#11230) 2024-05-13 14:15:37 +12:00
Security Merge branch '5.1' into 5 2023-11-01 20:14:50 +00:00
View ENH Create Requirements::customScriptWithAttributes (#11076) 2023-12-22 12:00:33 +13:00