How should I set the foreign keys of a table?
In the method public function relations ()?
'comune1'=>array(self::HAS_MANY, 'anagrafe', 'COMUNE_COMUNE_ID')
But sometimes gives me the error and sometimes not and why?
I was wrong to set the relation?