ich versuche eine MANY-MANY-MANY Beziehung herzustellen. Ich weiß wo mein Fehler liegt, jedoch weiß ich nicht wie ich ihn beheben soll.
yii_many_many_many2.PNG (9.83K)
Number of downloads: 33
apple - Model
public function relations()
{
return array(
'apple' => array(self::MANY_MANY, 'juice', 'apple_juice(apple_Id, juice_Id)',
'together' => true,
'joinType' => 'INNER JOIN',
),
'juice' => array(self::MANY_MANY, 'Buyer', 'juice_buyer(juice_Id, buyer_Id)',
'together' => true,
'joinType' => 'INNER JOIN',
),
);
}Apple -> Juice -> Buyer - Aufruf
public function appleJuiceBuyer( $baseform ){
return apple::model()->with(array('apple', 'juice'))->find('apple.baseform=?', array( $baseform ) );
}Mein zubehebender Fehler
Ich vermute das mein Fehler darin liegt, dass ich in der Relationstabelle mit "juice" eine MANY-MANY Beziehung Apple <-> Buyer herstelle und nicht Apple -> Juice -> Buyer
Für eine Hilfe bin ich schon jetzt sehr dankbar.!!!

Help














