Re: Mapping multiple EOs to one table
Re: Mapping multiple EOs to one table
- Subject: Re: Mapping multiple EOs to one table
- From: Jonathan Rochkind <email@hidden>
- Date: Mon, 18 Aug 2003 16:10:59 -0500
I'm doubtful that single table inheritance will work for you. The EOF
inheritance scheme assumes that each row represents a certain class, and
doesn't change back and forth. You have rows that really are all classes at
once, it's not that certain rows are certain classes. It's that they're all
at once, but you just don't want to fetch all the data in at once. I don't
think you are going to be able to use EOF inheritance in a way that
achieves your goals (doesn't fetch in all columns at once), but doesn't
cause any problems. That's too far from what it's intended for, I think.
But I haven't been able to think of a better solution either. You might be
best off just moving your data to a number of different tables, instead of
having them all in one table.
With your previous design, having multiple EOEntities that are really the
same table, you could try something like: Designate of your entities as the
'primary' one. Only this one will ever be inserted. It has relationships
to the other entities, that are really relationships to other 'parts' of
the same row the source EO represents. Follow these relationships to get
these other parts; don't ever insert EOs of these other entities. Still
not sure that will work. Monkeying around with the 'propagate primary key'
and 'mandatory' and 'owns destination' attributes on the relationships from
this 'main' entity to the other ones might get you somewhere too. But I'm
not too optimistic about it myself.
--Jonathan
At 08:23 AM 8/19/2003 +1200, Ray Ackland wrote:
Well, even though many of the tables will only be sharing one common field
(primary key) I guess what we are looking at is really single table
inheritance. This could be the way to go. Seems to meet all the criteria -
the parent class is just the primary key field.
I will definitely try it and tell you what happens. That gives me much
more optimism.
Ray.
On Tuesday, Aug 19, 2003, at 06:08 Pacific/Auckland, Ricardo Strausz wrote:
Just guessing...
but first, does you multiple views of the same table inherits from one
the other?
It may be that, if you want to have different views from the same table,
define different childs for it (and not simply unrelated entities which
may confuse EOM).
Hope it helps! let us know
Dino
_______________________________________________
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.
_______________________________________________
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.