【发布时间】:2020-04-14 21:06:11
【问题描述】:
我有 3 个型号的价格、描述和产品
Description 模型与 Price 模型有关系,Price 模型与 Product 有关系。
当我尝试使用价格关系在描述模型上获取产品时,我可以调用产品吗?
这就是我想要做的事情
$description = Description::model()->with('Price')->findAll();
// after that I want to call the product which is on price.
他们都是使用他们的 id 连接的。 product_id、description_id 和 price_id
我怎样才能做到这一点?有办法吗?
【问题讨论】:
标签: php yii relationship yii1.x