|
|
@@ -34,6 +34,7 @@ class BelongsToMany extends Association {
|
|
|
use ExternalAssociationTrait {
|
|
|
_options as _externalOptions;
|
|
|
_addFilteringCondition as _addExternalConditions;
|
|
|
+ transformRow as protected _transformRow;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -244,6 +245,19 @@ class BelongsToMany extends Association {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Correctly nests a result row associated values into the correct array keys inside the
|
|
|
+ * source results.
|
|
|
+ *
|
|
|
+ * @param array $row
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function transformRow($row) {
|
|
|
+ $row = $this->_transformRow($row);
|
|
|
+ unset($row[$this->junction()->alias()]);
|
|
|
+ return $row;
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
* Get the relationship type.
|
|
|
*
|
|
|
* @return string
|