AR relations with a self referential relation type...

I have a Category table where a row can be associated with a parent row (if it is a second level category) via the parentId column. In my AR model file i putted:

public function relations()


		// NOTE: you may need to adjust the relation name and the related

		// class name for the relations automatically generated below.

		return array(

                        'categories' => array(self::HAS_MANY, 'Category', 'parentId'),

                        'parentCategory' => array(self::HAS_ONE, 'Category', 'parentId'),



but it seems it doesn't work why?

parentCategory should use BELONGS_TO.


parentCategory should use BELONGS_TO.
you are right i'm really could i do that mistake? i even knew that...anyway thank you as always ;)