okay how is this ambiguous? I have the relationship table in there. I also have tried adding an alias. Both ways gave me ambiguous.
public function defaultScope()
{
$t = $this->getTableAlias(false,false);
if ($t=='t'){
$sid = Yii::app()->user->store();
return array(
'with'=>array('product'),
'condition'=>'product.store_id=:store_id' ,
'params' => array(':store_id' => $sid)
);
} else {
return array();
}
}
public function defaultScope()
{
$sid = Yii::app()->user->store();
return array(
'with'=>array('product'),
'condition'=>'product.store_id=:store_id' ,
'params' => array(':store_id' => $sid)
);
}