Cexistvalidator Error

Hi,

Client model:




  public function rules()

  {

    return array(

      ...

      array('support_type_id', 'exists', 'attributeName'=>'id', 'className'=>'SupportType', 'skipOnError'=>true),

      ...

    );

  }



Gives this Error:




SQL: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: argument of WHERE must be type boolean, not type integer

LINE 1: SELECT 1 FROM "client" "t" WHERE support_type_id LIMIT 1

^. The SQL statement executed was: SELECT 1 FROM "client" "t" WHERE support_type_id LIMIT 1. Bound with :className='SupportType', :skipOnError=true



Whats causing this error?

Thanks.

Found the problem, its ‘exist’ and not ‘exists’ :(