ORM: HAS_ONE\BELONGS_TO relation with custom PK->FK association

The docs say the following:

But it doesn’t seem to work with HAS_ONE and BELONGS_TO relations.

Lets say I want to join the standard AuthAssignment table with the User table and be able to get the users’ role. The thing is I have to join the tables on [i]AuthAssignment.userid /i and [i]User.username [/i](and it is not the PK, the PK is User.id)

So it should be something like

'authAssignment' => array(self::HAS_ONE, 'AuthAssignment', array("userid" => "username"))

but it gives me the following error:

how do I specify a custom primary key - to - foreign key association?