entity inheritance possibilities
entity inheritance possibilities
- Subject: entity inheritance possibilities
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 08 Sep 2003 12:20:49 -0500
I have several entities which are NOT in an inheritance hiearchy. They each
live in seperate tables.
However, now I realize I want to put them in an inheritance hiearchy. They
do have some attributes/relationships in common---but I don't need an
inheritance hieararchy for that. I don't need to manually qualify against
the base entity----I can construct these multi-entity qualifiers by hand.
What I _do_ need to do is have a relationship that can point to an object
from any one of these entities. [Right now about 8, could theoretically
rise to a couple dozen eventually]. It seem that inheritance is the
'right' way to do this.
But... is it too late for me? These entities are already populated with
lots of objects. The problem is, there are likely pks in common from one
entity to another. There might be an object in entity1 with pk 101, and an
object in entity2 with that same pk, 101. These pks are used in lots of
fks all over the db----changing the pk of all these rows would be a major
pain, is not really feasible. So am I sunk? I guess I'd want
'horizontal' inheritance----each entity has it's own table, there is no
shared common table. Does this absolutely require that pks be unique
throughout the inheritance hiearchy? Is there any way around this?
Are there any other good ways I can get a relationship which can point to
any one of a number of entities?
--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.