Relational query to three tables [solved]

Hello everybody!

I have three tables (type, category, subcategory) which relate to each other this way:

in Category.php

public function relations()


		return array(

                    'type'=>array(self::BELONGS_TO, 'Type', 'type_id'),        

                    'subcategories'=>array(self::HAS_MANY, 'Subcategory', 'category_id'),



I have working query


Is it possible to add subcategories to this query?


This syntax worked last time I tried (1.0.3 IIRC)

$types=Type::model()->with('categories', 'categories.subcategories')->findAll();


Yes it still perfectly works!

Thanks a lot :)