From 16581a13fb1706c49ae73e76b5ae6dc97ea93c66 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 4 Nov 2021 08:09:01 +0100 Subject: [PATCH] chg: [individual] MailingLists association improved --- src/Model/Table/IndividualsTable.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Model/Table/IndividualsTable.php b/src/Model/Table/IndividualsTable.php index 0a29a5d..5b4126c 100644 --- a/src/Model/Table/IndividualsTable.php +++ b/src/Model/Table/IndividualsTable.php @@ -38,7 +38,9 @@ class IndividualsTable extends AppTable $this->belongsToMany('Organisations', [ 'through' => 'Alignments', ]); - $this->belongsToMany('MailingLists'); + $this->belongsToMany('MailingLists', [ + 'through' => 'mailing_lists_individuals', + ]); $this->setDisplayField('email'); }