cakephp-3.6

CakePHP 3.6.11: Where clause of joined tables

痞子三分冷 提交于 2019-12-24 21:12:35
问题 I have these 3 tables: customers: customerstable services: servicestable customerservices: customerservicestable With this relation in CustomerservicesTable.php : $this->belongsTo('Customers') ->setForeignKey('customerid'); $this->belongsTo('Services') ->setForeignKey('serviceid'); In Customers edit page I want to add a table with the Services of the specific customer (and then add new, edit existing etc). So in Template\Customers\edit.ctp I have this table: <h3><?= __('Services') ?></h3>