Cakephp 3 - belongsToMany with _joinData
问题 I try to realize a bolongsToMany association with additional data in the join table. The join table has columns for the foreign keys and an additional column 'context' articlesController: $article = $this->Articles->patchEntity($article, $this->request->getData()); debug($article);die; and in a Plugin-Behavior: public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $options) { $data['Categories.Categories'] = ['id' => '1', '_joinData' => ['context' => 'Tag']]; debug($data)