Todd Benson
12/16/2007 9:54:00 PM
On Dec 16, 2007 3:48 PM, Todd Benson <caduceass@gmail.com> wrote:
> On Dec 16, 2007 1:45 PM, John Griffiths <indiehead@gmail.com> 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.
<bows out and tries not to get killed on the way out>
Todd