diff --git a/src/Listener/ViewListener.php b/src/Listener/ViewListener.php index 0d2c25bf..7d609c4a 100644 --- a/src/Listener/ViewListener.php +++ b/src/Listener/ViewListener.php @@ -554,7 +554,7 @@ protected function _associations(array $whitelist = []) $associationConfiguration[$type][$assocKey]['displayField'] = $association->getTarget()->getDisplayField(); $associationConfiguration[$type][$assocKey]['foreignKey'] = $association->getForeignKey(); $associationConfiguration[$type][$assocKey]['propertyName'] = $association->getProperty(); - $associationConfiguration[$type][$assocKey]['plugin'] = pluginSplit($association->className())[0]; + $associationConfiguration[$type][$assocKey]['plugin'] = pluginSplit($association->getClassName())[0]; $associationConfiguration[$type][$assocKey]['controller'] = $assocKey; $associationConfiguration[$type][$assocKey]['entity'] = Inflector::singularize(Inflector::underscore($assocKey)); $associationConfiguration[$type][$assocKey]['entities'] = Inflector::underscore($assocKey);