Usage of scopes in relations()

Can I use scopes in relations function like this???

public function relations()

{

return array(


  'arrTeaserImage'    => array(self::HAS_MANY, 'TeaserDocument', 'idTeaser',


    'with' => 'objDisplayType:teaser'


   )


);

}

In TeaserDocument I defined a scope named "teaser", but nothing happens…

teaser should be defined in the objDisplayType class…

Quote

teaser should be defined in the objDisplayType class...

Sorry, my fault. Of course it is defined in objDisplayType class, but still nothing happens. It seems like the "with" is ignored…

What is the generated SQL? Note that 'with' option is only used by lazy loading.

Quote

What is the generated SQL? Note that 'with' option is only used by lazy loading.

Ah ok, how can I handle it  for the following?

Vehicle::model()->with('arrTeaserImage')->findAll();

Has it got to be like that:

Vehicle::model()->with('arrTeaserImage.objDisplayType:teaser')->findAll();

?

EDIT:

Yes, that works, but how can I define that in function "relations", for eager loading?

I just checked in a fix to make 'with' working with eager loading. Thanks.