我正在尝试进行此查询
SELECT * FROM `rentprograms` AS `Rentprogram`
inner join `vehiclerentprograms` as `Vehiclerentprogram` on `Vehiclerentprogram`.`rentprogramid` = `Rentprogram`.`id`
inner join `vehicles` AS `Vehicle` ON `Vehicle`.`id` =`Vehiclerentprogram`.`vehicleid` WHERE `Vehicle`.`id` = 1
CakePHP 中的代码
$this->Rentprogram->find('all'), array(
'fields'=>array('*'),
'joins' => array(
array(
'table' => 'vehiclerentprograms',
'alias' => 'Vehiclerentprogram',
'type'=>'inner',
'conditions' => array(
'Vehiclerentprogram.rentprogramid' => 'Rentprogram.id',
)
),
array(
'table' => 'vehicles',
'alias' => 'Vehicle',
'type'=>'inner',
'conditions' => array(
'Vehicle.id' => 'Vehiclerentprogram.vehicleid',
)
)
),
);
但它只显示 Rentprogram 的值。我怎样才能拥有与 Rentprogram、Vehicle、Vehiclerentprogram 相关的所有字段。