I am using Yii 1.x version.
I am stuck while setting up a relation with same table using two different model. my scenario is something like this.
There are two tables, user and user_friend_list
Two different model for each table User & UserFriendList.
Following are the fields for my table.
User: id, firstname, lastname.
UserFriendList: id, user_id,friend_user_id
I want to set up relation between two model so that i can fetch all friend information of any user. Kindly suggest me what would be best approach to achieve this???
User Table store user information.
User Friend List table store friend list of user.