Re: Single Table inheritance and EM question[SOLVED]

2008-08-20 Thread William Hatch
Damn. So, I was using the static fetch methods inherited from the abstract parent fetchSummaries within my own static fetches. I switched to using the ones from the _Parent... where it explicitly says fetchDay/Hour/Month summaries... Maybe I should switch brands of coffee? Or go direct

Re: Single Table inheritance and EM question

2008-08-20 Thread Guido Neitzer
On 20.08.08 14:26, "William Hatch" <[EMAIL PROTECTED]> wrote: > I just tried setting the table for the abstract entity, and that > results in a single sql statement, but unfortunately all the possible > values for the differentiating key are all nicely OR'd together in the > resulting where clause

Re: Single Table inheritance and EM question

2008-08-20 Thread William Hatch
On Aug 20, 2008, at 4:06 PM, William Hatch wrote: On Aug 20, 2008, at 2:08 PM, Chuck Hill wrote: 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

Re: Single Table inheritance and EM question

2008-08-20 Thread Chuck Hill
On Aug 20, 2008, at 1:06 PM, William Hatch wrote: On Aug 20, 2008, at 2:08 PM, Chuck Hill wrote: 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

Re: Single Table inheritance and EM question

2008-08-20 Thread Guido Neitzer
On 20.08.08 14:06, "William Hatch" <[EMAIL PROTECTED]> wrote: > The sub entities all have the Parent defined as Summary (using the pop > up) The Summary entity is abstract, and does not have a corresponding > table set; I thought this was correct; is it? Each of the sub types > use this as the dis

Re: Single Table inheritance and EM question

2008-08-20 Thread William Hatch
On Aug 20, 2008, at 2:08 PM, Chuck Hill wrote: 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

Re: Single Table inheritance and EM question

2008-08-20 Thread Chuck Hill
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,

Re: Single Table inheritance and EM question

2008-08-20 Thread William Hatch
On Aug 20, 2008, at 12:40 PM, Guido Neitzer wrote: On 20.08.08 09:56, "William Hatch" <[EMAIL PROTECTED]> wrote: Hi Mike, it's the same on all entities. And, in response to Guido's thought. there's nothing hitting the relationships within this context and they're not prefetched either.

Re: Single Table inheritance and EM question

2008-08-20 Thread William Hatch
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?

Re: Single Table inheritance and EM question

2008-08-20 Thread Guido Neitzer
On 20.08.08 09:56, "William Hatch" <[EMAIL PROTECTED]> wrote: > Hi Mike, it's the same on all entities. And, in response to Guido's > thought. there's nothing hitting the relationships within this context > and they're not prefetched either. Are the entities all in the same model? I ask only be

Re: Single Table inheritance and EM question

2008-08-20 Thread Mike Schrag
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 i

Re: Single Table inheritance and EM question

2008-08-20 Thread William Hatch
Hi Mike, it's the same on all entities. And, in response to Guido's thought. there's nothing hitting the relationships within this context and they're not prefetched either. Bill On Aug 20, 2008, at 10:56 AM, Mike Schrag wrote: I should also note that there are three separate select sta

Re: Single Table inheritance and EM question

2008-08-20 Thread Mike Schrag
I should also note that there are three separate select statements being generated; one for each of the concrete types; it's not one select with some OR's in the where. Not sure if that helps shed light on this. Thanks again. I would verify that the table name is the same for all your entitie

Re: Single Table inheritance and EM question

2008-08-20 Thread Guido Neitzer
Wild guess: are you maybe just seeing the relationships being resolved? Or is it really getting all objects, when you ask for one without prefetching any relationships? cug On 20.08.08 08:38, "William Hatch" <[EMAIL PROTECTED]> wrote: > I should also note that there are three separate select st

Re: Single Table inheritance and EM question

2008-08-20 Thread William Hatch
I should also note that there are three separate select statements being generated; one for each of the concrete types; it's not one select with some OR's in the where. Not sure if that helps shed light on this. Thanks again. On Aug 20, 2008, at 3:31 AM, William Hatch wrote: First project

Single Table inheritance and EM question

2008-08-20 Thread William Hatch
First project using EM and single table inheritance, I've got an abstract base entity, with three concrete sub types, I'm putting a qualifier in the Basic Tab's Qualifier field in the form of (summaryRangeType="hour"), etc for each of the three types, obviously with different values for eac