Re: inheritance nuts and bolts

"Christian Edward Gruber" <[email protected]>
Newsgroups gmane.comp.web.webobjects.eof
Message-ID <019301c26e70$b7e13f20$0101900a@lucifer>
It's a bit late, but still...

You do need to re-define them.  Since the sub-entity can map the attribute
from the same table, or from another table through flattening, it's not
automatically implicit where it comes from.  Especially since you can go
fairly deep.  Requiring you to specify is a pain (though ctrl-c ctrl-v works
nicely on attributes and relationships) it does leave you the flexibility to
retrieve attributes from a variety of source entities.

regards,
Christian.
----- Original Message -----
From: "Jonathan Rochkind" <[email protected]>
To: <[email protected]>
Sent: Thursday, July 25, 2002 4:19 PM
Subject: inheritance nuts and bolts


> I am realizing why I was scared of EOEntity inheritance before. Because
> it's complicted, and there's virtually no documentation on it. A very
> little bit in the old 4.5 docs, but not enough and it's been mysteriously
> removed from the 5 docs.
>
> Anyway, for starters, I can't even seem to figure out how to model things
> in EOModeler.
>
> At the moment, I am trying single table inheritance, with an abstract
> super-entity. So I need to define all the common superclass attributes in
> the super-entity?  Do I need to _redefine_ them all in each sub-entity?  I
> wouldn't think I would, but EOModeler validation is complaining that my
> subclass lacks a primary key attribute defined in the superclass. So I
need
> to duplicate all attributes (or just pk attributes) from the super-entity
> to each sub-entity? And every time I add a new one to teh super-entity,
add
> it again to all the sub-entities?
>
> Similarly, I'm using single-table inheritance, but I guess the EOModel
> doesn't neccesarily know that. So I need to define the same external table
> name in each of my sub-entities? As well as my super-entity? Or since the
> super-entity is abstract, it doesn't really need an external table name
> defined?
>
> Can someone help me out with this stuff?
>
> _______________________________________________
> EOF mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/eof
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.