Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1FBC045D4 for ; Thu, 19 May 2011 20:36:34 +0000 (UTC) Received: (qmail 89580 invoked by uid 500); 19 May 2011 20:36:33 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 89546 invoked by uid 500); 19 May 2011 20:36:33 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 89538 invoked by uid 99); 19 May 2011 20:36:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2011 20:36:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [190.151.36.194] (HELO gondor.welinux.cl) (190.151.36.194) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2011 20:36:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by gondor.welinux.cl (Postfix) with ESMTP id C89D8502305 for ; Thu, 19 May 2011 16:37:21 -0400 (CLT) X-Virus-Scanned: amavisd-new at welinux.cl Received: from gondor.welinux.cl ([127.0.0.1]) by localhost (gondor.welinux.cl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6Us4w1Oq0PLX for ; Thu, 19 May 2011 16:37:19 -0400 (CLT) Received: from gondor.welinux.cl (localhost.localdomain [127.0.0.1]) by gondor.welinux.cl (Postfix) with ESMTP id 861E650225A for ; Thu, 19 May 2011 16:37:19 -0400 (CLT) Date: Thu, 19 May 2011 16:37:18 -0400 (CLT) From: "Hans C. Poo" To: user@cayenne.apache.org Subject: Re: Help or sample on vertical inheritance Message-ID: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Originating-IP: [190.151.36.194] X-Mailer: Zimbra 7.1.0_GA_3140 (ZimbraWebClient - FF3.0 (Linux)/7.1.0_GA_3140) X-Virus-Checked: Checked by ClamAV on apache.org Andrus, Good, thanks it's working now. Besides following the indications in the manual, analysing your response i'= ve noticed the following things that weren't obvious (for me) at first: - The child class must map to the parent table. In Child Entity in the Entity tab Table/View must be changed to the paren= t table. - Manually map attributes of the Child Entity to the Child Table When we map the Child Entity to use the Parent Table, the attributes of the Child are no longer present in the parent table, though, we must manually map every attribute of the Child Entity to its corresponding attribute in the Child Table, the problem is that the Modeler 3.0.1 doesn= 't include them in the Combo Box where you set DBAttribute, and this modification must be= done manually in the XML Map file, the format is table.field. Bye Hans Hans Poo, Welinux S.A. Bombero Ossa #1010, oficina 800, +56-2-3729770, Movil: +56-9-3199305 Santiago, Chile ----- Mensaje original ----- De: "Andrus Adamchik" Para: user@cayenne.apache.org Enviados: Mi=C3=A9rcoles, 18 de Mayo 2011 19:55:26 Asunto: Re: Help or sample on vertical inheritance Ok, here is a modified version of that DataMap that has vertical inheritanc= e mapped correctly. Per http://cayenne.apache.org/doc30/modeling-vertical-i= nheritance.html v-inheritance in Cayenne is the same as single-table, only = with flattened attributes to child tables. So the main change that I made w= as mapping Programmer to ARTIST table, and then flattenning "languages" att= ribute to "programmer.LANGUAGES". Also removed ObjRelationships between Artist and Programmer. That should be= it. Sorry for delayed reply. Cheers, Andrus