Re: Single Table inheritance and EM question
Re: Single Table inheritance and EM question
- Subject: Re: Single Table inheritance and EM question
- From: Chuck Hill <email@hidden>
- Date: Wed, 20 Aug 2008 11:08:18 -0700
On Aug 20, 2008, at 10:06 AM, William Hatch wrote:
On Aug 20, 2008, at 12:15 PM, Mike Schrag wrote:
Fetches to one are resulting in generated sql to all three types,
as if I'm fetching on the abstract parent, which I'm not.
Is this fetching to one of these from a completely separate entity,
or fetching to-one from its reflexive relationship? Is this the
same problem that someone else ran into a couple days ago with
relationships from subtypes to the base class of another entity
(guido mentioned something about ERAttachment here that I never
saw?).
I have an abstract parent Summary, with three concrete sub types;
HourSummary, DaySummary, MonthSummary. Month has (optional) a to-
many to Day, which in turn has (optional) a to-many to Hour. None of
these should be getting tripped right now and are not prefetched.
So, if I fetch say HourSummary's, I see three sql selects for Hour,
Day and Month. It's almost as if the qualifying attribute is being
ignored, although each sql statement has it in the where clause
matching what I defined in the model in the Basic tab, Qualifier
field (see original post) So one fetch to a specific Entity results
in sql selects for all three, with result sets coming back from all
three. Ouch;-) At least it's fast. Thanks Mike
Something is messed up in the model. Is the parent of each sub-entity
set correctly? Like Mike said, this sounds like the SQL from
Horizontal Inheritance. My best guess is that something in the model
(table names not _exact_ -- case counts?) is making EOF think this is
not single table inheritance.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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