Displaying 1 result from an estimated 1 matches for "teams_season".
Did you mean:
teams_seasons
2006 Jan 09
3
Include with two references of one model of the same table
...ll_played id
find(:all, :include => ["hometeam", "awayteam"])
end
end
Heres a sample of the error...
|PGError: ERROR: table name "matches" specified more than once
: SELECT matches."awayteam_goals" AS t2_r1, matches."season_id" AS t1_r7, teams_seasons."division_id" AS t0_r6, matches."hometeam_goals" AS t2_r2, matches."league_id" AS t1_r8, matches."awayteam_id" AS t2_r3, matches."venue_id" AS t1_r9, matches."hometeam_id" AS t2_r4, matches."matchtime_start" AS t2_r5, matches.&q...