I've got the following problem and looked everywhere for a solution but havn't been able to find one.
I've got 3 tables in my database, Pot, Vegetation and PotsPerVegetation. I can get the relations between pots and vegetations no problem, using the relations in the model, f.e. I can call $vegetation->pots no problem.
However now I want to find all the pots that don't have the current vegetation as a relation. so I want to get the difference from these results. Here is some code to illustrate my problem.
$pots = Pot::model()->findAll(); $relatedPots = $vegetation->tblPots; // I know this doesn't work but this is basically what I want to do. $difference = $pots - $relatedPots
Thanks in advance!