Fwd: Re: [Glorp-development] Class hierarchy mapping & queries

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: [Glorp-development] Class hierarchy mapping & queries

Alan Knight-2

X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9
Date: Wed, 13 Dec 2006 11:03:56 -0500
To: "Mark Plas" <[hidden email]>,
        <[hidden email]>
From: Alan Knight <[hidden email]>
X-magma-MailScanner-Information: Magma Mailscanner Service
X-magma-MailScanner: Clean
X-Spam-Status:
X-Spam-Score: 1.7 (+)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
        See http://spamassassin.org/tag/ for more details.
        Report problems to
         http://sf.net/tracker/?func=add&group_id=1&atid=200001
        1.0 FORGED_RCVD_HELO       Received: contains a forged HELO
        0.2 HTML_TEXT_AFTER_BODY BODY: HTML contains text after BODY close tag
        0.0 HTML_MESSAGE           BODY: HTML included in message
        0.5 HTML_20_30             BODY: Message is 20% to 30% HTML
Subject: Re: [Glorp-development] Class hierarchy mapping & queries
X-BeenThere: [hidden email]
X-Mailman-Version: 2.1.8
List-Id: <glorp-development.lists.sourceforge.net>
List-Unsubscribe: < https://lists.sourceforge.net/lists/listinfo/glorp-development >,
         <[hidden email] >
List-Archive: < http://sourceforge.net/mailarchive/forum.php?forum=glorp-development >
List-Post: <[hidden email]>
List-Help: <[hidden email] >
List-Subscribe: < https://lists.sourceforge.net/lists/listinfo/glorp-development >,
         <[hidden email] >
Sender: [hidden email]
X-pstn-levels:     (S:99.90000/99.90000 R:95.9108 P:95.9108 M:88.1613 C:98.6951 )

That's an interesting question, and one which illustrates why I described the inheritance support as having weaknesses.  In particular, it appears that subselects to abstract classes mapped with horizontal inheritance don't work. Also, it looks like mechanisms like retrieve: don't work with horizontal inheritance. In the former case it tries to build up a query using the primary table of the abstract superclass, which doesn't have one. In the latter I think it's just that the retrieve: clauses don't get propogated to the generated sub-queries.

I think the right thing to do for this would be for the subselect to generate a compound query doing a union of required fields from each of the concrete tables. But the inheritance support predates support for unions, and it hasn't been set up to use it. This would be useful for the general case of horizontal inheritance as well.

At 04:53 AM 12/13/2006, Mark Plas wrote:
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
         boundary="----_=_NextPart_001_01C71E9C.86D3C84A"

Hi,
 
This mail is part of a set of glorp questions I have (see some other mails I've sent recently).
 
The question I would like to address here is:
 
Suppose I have a class hierarchy mapped in such a way that there is one table for each concrete class. When I do a query on the abstract superclass, Glorp will issue several sql statements and concatenate the results (I think). My question is: What happens if I have a query on the abstract superclass that itself contains a sub-select on another abstract superclass ? Will Glorp execute queries for every combination of concrete classes ? Are there limitations here ?
 
Thanks,
Mark
 
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Glorp-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/glorp-development

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Glorp-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/glorp-development

--
Alan Knight [|], Cincom Smalltalk Development

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross