Hey
I’ve got a relation for my players model like this.
'team' => array(self::MANY_MANY, 'Team', '{{teams_players}}(team_id, player_id)', 'order'=>'leave_time ASC'),
Where I’m using a relational table to link each player with many teams, the teams_players table look like this.
team_id int(11)
player_id int(11)
join_time int(11)
leave_time int(11)
status int(1)
Atm it works fine, the relation part, I get all the teams that the player has a been part of, sorted by the leave_time. The issue is, that I would like to be able to get the join_time, leave_time and the status from the relation table together with each team data.
How should I go about doing that?
Thanks