2 relations for some model

Hello everything from a bigges country in the world! Pretime sorry for bad english.

I’m writing a code:

public function relations()


    return array(

        'album' => array(self::HAS_ONE, 'Album', 'userId', 'condition' => 'travelId IS NULL'),

        'albums' => array(self::HAS_MANY, 'Album', 'userId', 'condition' => 'travelId IS NOT NULL'),



and trying execute this as…:

$user = User::model()->with(array('albums', 'album'))->findByPk($userId);

and it make a error:

Integrity constraint violation: 1052 Column ‘travelId’ in where clause is ambiguous

this is bug or i’m doing it wrong?

This will help you: http://www.yiiframework.com/doc/guide/1.1/en/database.arr#disambiguating-column-names