diff --git a/src/ORM/PolymorphicHasManyList.php b/src/ORM/PolymorphicHasManyList.php index 49a51cf97..20f9907c1 100644 --- a/src/ORM/PolymorphicHasManyList.php +++ b/src/ORM/PolymorphicHasManyList.php @@ -29,6 +29,14 @@ class PolymorphicHasManyList extends HasManyList return $this->dataQuery->getQueryParam('Foreign.Class'); } + /** + * Gets the field name which holds the related object class. + */ + public function getForeignClassKey(): string + { + return $this->classForeignKey; + } + /** * Create a new PolymorphicHasManyList relation list. *