Table relation problems


#1

Hi.

I need to know if it’s possible to do something like this:
http://pastie.org/402205

The table game_guesses has 2 keys for team: home_key and guest_key. The
problem is that a normal relation would be team has_many/has_one
game_guessbut that is not the case.

I just want to see the team information using guess.homeTeam.name or
guess.guestTeam.name (or other information of the Team object)

Is there a way to solve it? I tried to change the model, but eventually
it
would lead to a situation like this one.

Thanks,

Israel G.
Joan Rivers - “The first time I see a jogger smiling, I’ll consider
it.”