On 5 Jan 2009, at 16:49, Martin Hawkins wrote:
>
> When I try it the other way,
> dim_player_found = DimPlayer.find(:first, :conditions => [ "surname
> = ?", "XXXX"])
> dim_player_found.map_players gives me an error, such as the one below,
> which suggests I'm doing something wrong with the :foreign_key =>
> "to_player_id" line.
> The error is
> S0022 (207) [unixODBC][FreeTDS][SQL Server]Invalid column name
> 'dim_player_id' which is what I would expect if I had not tried the
> foreign_key re-assignment.

You need to set the :foreign_key option on the has_many too.

Fred
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to