Custom FK=> PK in Relations

Hi, some have an example of using Customs FK and PF in the relations function.

I try this with no success:

//'estados' => array(self::BELONGS_TO, 'TiposGenerales', array('estado'=>'cod'), 'condition'=>' estados.tipo = \'ESTADO_DEF_CUOTA\''  ),

Is says that parameter 2 expected to be String and an array was passed.

Best regards

The syntax looks correct, for Yii 1.1.9. Are you sure you have this version installed?

I found this in yiiBase.php

public static function getVersion()


	return '1.1.8';


looks like i’m on 1.1.8 !

You’ll have to upgrade.