Re: strange EO inheritance issue
Re: strange EO inheritance issue
- Subject: Re: strange EO inheritance issue
- From: Patrick Robinson <email@hidden>
- Date: Thu, 03 Aug 2006 22:49:50 -0400
Hey John,
Oh, yes, I checked every aspect of every database column and
constraint, and of every model attribute and relationship *very*
painstakingly. I was even comparing the entities' .plist files in
text mode.
I would think single-table mapping would be the better choice if
performance is the driving concern... no? I would think the benefit
of vertical mapping would be clarity of expression of the design
(that is, implementation look a lot like conceptual design); and for
horizontal mapping.
I chose single-table mapping for B because for the most part, it's
merely a correlation table with a couple of extra attributes, mostly
shared by all subclasses. There are a couple of exceptions, but they
are just that: exceptions - not the general rule.
I tend to agree with you, though, that this is getting to be a
complicated mess, and probably not worth the effort. But it would be
kinda cool if I could get it to work. :)
- Patrick
On Aug 3, 2006, at 7:55 PM, John Larson wrote:
Patrick,
Not to seem too obvious, but did you check the relationship in your
C subclass. I spent two days troubleshooting a bunch of
subclassing just to find out I forgot to uncheck the Abstract box
in the subclasses. I'm just about over the hangover now, but I now
*always* check EOModeler.
IMHO, however, I would evaluate your decision to use such a
scheme. In the time you spend troubleshooting this you may be able
to implement true horizontal or vertical inheritance and get better
performance.
John
On Aug 3, 2006, at 4:05 PM, Patrick Robinson wrote:
I've got a rather strange EO inheritance question. I've got a
situation where I've set up single-table inheritance (with a
subclass "type" column) for 7 out of 8 of my subclasses; and a
separate table (with the same "type" column) that has a bunch more
columns for the 8th, just because I didn't want all those columns
sitting there empty for most of the rows (i.e. for the other 7
subclasses). Probably false economy, but be that as it may....
My structure looks like this:
A <-->> B <<--> C
C is modeled as an inheritance hierarchy using horizontal mapping,
and B is modeled as the inheritance hierarchy described above,
using mostly single-table mapping. There is a different subclass
of B for each corresponding subclass of C.
It all built just fine, but when it came time to save an object of
my new C subclass (the one that corresponds to the B subclass with
its own table), the primary key of the C subclass object did not
propagate to the B subclass object -- it was left as null. This
is done with Oracle, so there's an Oracle sequence C_SEQ that's
used to obtain C's primary key, and C_ID is the primary key of all
C subclasses. Normally, this propagates to the B subclass objects
just fine (with all the other B subclasses, that is), but it isn't
working with the B subclass that is set in EOModeler to use its
own table.
Has anyone else tried to do this kind of thing, or am I just
trying to do something idiotic? :-)
--
Patrick Robinson
AHNR Info Technology, Virginia Tech
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden