From: Todd Benson Date: 2007-12-17T06:53:58+09:00 Subject: Re: teams -> members -> users On Dec 16, 2007 3:48 PM, Todd Benson wrote: > On Dec 16, 2007 1:45 PM, John Griffiths wrote: > > thanks, sort of works. > > > > isn't it possible to do: > > > > has_one :member > > has_one :team, :through => member > > > > every time i try i get... > > > > undefined key(s) through > > I don't know your model, but is there a reason why a member and a user > have to be different tables/classes? (I'm going by the descriptions > of your data relations) > > For lack of more information, it appears to me there is something > wrong with your data model, like maybe you are trying to shoehorn what > you consider unstable identity (user) into stable identity (member). > I don't see that as a useful relational set up. What's your use > case?. > > I think most database guys would agree that one to one relations are > simple tuples. Why would you be required to make them different > tables/classes? From your original post, a member _is_ a user. The > only thing I can think of why you would want to separate them is > because that relation changes over time, which can easily be handled > by the db (think "create table user_update..."). > > Todd Well, I certainly must apologize for that rant. I think I misread what you said. It's just that I've seen a lot of models similar to yours that were a nightmare to work with when doing reports; that's all. Todd