- -- Insert a record into odds_games__teams mapping the
- -- home/away teams to this game. Use the full record syntax
- -- because the types would let us mix up the home/away teams.
- insert_ OddsGame_Team {
- ogt_odds_games_id = game_id,
- ogt_away_team_id = away_team_id,
- ogt_home_team_id = home_team_id }
+ -- Now insert the game, keyed to the "odds" and its teams.
+ game_id <- insert_xml_fk_teams odds_id away_team_id home_team_id game