Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 58431 invoked from network); 7 Dec 2005 17:34:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Dec 2005 17:34:09 -0000 Received: (qmail 61751 invoked by uid 500); 7 Dec 2005 17:33:59 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 61665 invoked by uid 99); 7 Dec 2005 17:33:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2005 09:33:59 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.224.30.66] (HELO service-01.spree.de) (212.224.30.66) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2005 09:33:58 -0800 Received: from [172.16.1.19] (rio.spree.de [172.16.1.19]) (authenticated bits=0) by service-01.spree.de (8.13.4/8.13.4/Debian-3) with ESMTP id jB7HVxsM000572 for ; Wed, 7 Dec 2005 18:31:59 +0100 Message-ID: <43971CFC.8030701@spree.de> Date: Wed, 07 Dec 2005 18:33:48 +0100 From: Michael Watzek Organization: Tech@Spree GmbH User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jdo-dev@db.apache.org Subject: Inheritance mapping 3 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, inheritance mapping 3 is an optimization of mapping 1: Mapping 1 specifies a table for each class in the inheritance hierarchy. These tables only contain columns for the declared fields. Tables of subclasses refer tables of superclasses via FKs. In contrast, mapping 3 only specifies tables for concrete classes. Fields of abstract classes are mapped by inheritance strategy subclass-table. As class Insurance is abstract, it is not mapped to its own table in mapping 3. Instead, its fields are mapped to tables dentalinsurance and medicalinsurance. Due to the fact that class Insurance is the top most class in the inheritance hierarchy, tables dentalinsurance and medicalinsurance do not specify inheritance FKs. For this reason, it seems that the insurance hierarchy in mapping 3 has the same problem as the person hierarchy in inheritance mapping 2: There are not discriminator columns and there are not inheritance FKs. This means that implementations must support union joins for relationship navigation in order to retrieve the runtime type. As a consequence, the TCK would have to check for union join support when mapping 3 is executed (as we decided for mapping 2). However, there is a little difference on how the company model handles insurance relationships vs. employee relationships: Insurance relationships are specified to leaf classes of the inheritance hierarchy (DentalInsurance and MedicalInsurance). For this reason, the runtime type of an insurance relationship is the same as the declared type. Thus, I'm not sure on how to proceed with mapping 3. There are several options: 1) Drop mapping 3. 2) Make mapping 3 optional as we decided for mapping 2. 3) Leave it as is. What do you think? Regards, Michael -- ------------------------------------------------------------------- Michael Watzek Tech@Spree Engineering GmbH mailto:mwa.tech@spree.de Buelowstr. 66 Tel.: ++49/30/235 520 36 10783 Berlin - Germany Fax.: ++49/30/217 520 12 http://www.spree.de/ -------------------------------------------------------------------