silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
721 stars 821 forks source link

Update `many_many` through relations to support polymorphic "to" #11004

Closed sabina-talipova closed 5 months ago

sabina-talipova commented 11 months ago

Description

Currently for many_many through relations, the "from" can be polymorphic, but the "to" cannot. We should support polymorphism on both ends, if possible.

See: https://github.com/silverstripe/silverstripe-framework/blob/cf78a9d785b9959a92dfb52c2a456bea80a4c567/src/ORM/DataObjectSchema.php#L1156

GuySartorelli commented 5 months ago

Closing as a duplicate of https://github.com/silverstripe/silverstripe-framework/issues/9148