Re: entity inheritance possibilities
Re: entity inheritance possibilities
- Subject: Re: entity inheritance possibilities
- From: Ben Trumbull <email@hidden>
- Date: Mon, 8 Sep 2003 12:00:48 -0700
At 13:35 -0500 9/8/03, Jonathan Rochkind wrote:
Especially since the horizontal inheritance I'd end up with is
somewhat buggy anyway.
Well, if it's a copy of the tables, it can be single table or
vertical inheritance just as easily.
A) The psuedo to-one 'relationship' can't be established
until the destination is committed to the db.
Sure it can. Listen of the GIDChanged notification. Think like a
union in C, either a pk-entity or a temporary GID. You'll want a
direct reference to the object in the same EC.
You will not get the GIDChanged notification until after the save.
But the first two are. Any ideas there?
If you need first class relationships with all the functionality EOF
provides, then rewriting a relationship yourself in business logic is
not going to cut it.
The business logic approach works well for EOs which simply need a
reference to a set of other EOs. A looser connection than an actual
relationship.
2) Only one of them will actually be valid; which one is valid is
determined by the 'entityName' attribute, and we can use business
logic to address the proper one.
It may mostly work. It will defeat prefetched keypaths and generally
make life more complicated. The EOModel will not represent the
actual object mapping, which may be confusing later. If this pattern
is widely used, it will impact memory consumption.
If anyone can follow all this and understand what I'm talking
about... any ideas or suggestions?
Take your medicine now, don't create a maintenance nightmare later.
Hack the PKs or export to XML, or whatever. Begin next week with
something "normal".
Or don't do it at all. Your app works now, so maybe this problem
doesn't need to be solved. Maybe there are alternatives to changing
the entity relationships.
--
-Ben
_______________________________________________
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.