Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 35908 invoked from network); 28 Nov 2006 21:22:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2006 21:22:44 -0000 Received: (qmail 58756 invoked by uid 500); 28 Nov 2006 21:22:51 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 58741 invoked by uid 500); 28 Nov 2006 21:22:51 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 58732 invoked by uid 99); 28 Nov 2006 21:22:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2006 13:22:51 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of blacknext@gmail.com designates 64.233.166.181 as permitted sender) Received: from [64.233.166.181] (HELO py-out-1112.google.com) (64.233.166.181) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2006 13:22:39 -0800 Received: by py-out-1112.google.com with SMTP id p76so1463931pyb for ; Tue, 28 Nov 2006 13:22:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Cs/gcdPn1By6zSEoR01Ib9NsixT1+Wm/LKOoeMglk3r8AkGB35/RY0Wdt2aLbRyWcbRoBb1NrS/Jm1ZXX72YWOkR65WJQtS+ji+9O8fUpeRV9SR+uJ/jvh7DLX1xJPp2p3I9KkQhrSAIHeggsiF3+NiWxAlUmpx81R3wBZdmhKE= Received: by 10.35.125.16 with SMTP id c16mr2472132pyn.1164748938848; Tue, 28 Nov 2006 13:22:18 -0800 (PST) Received: by 10.35.126.4 with HTTP; Tue, 28 Nov 2006 13:22:18 -0800 (PST) Message-ID: Date: Tue, 28 Nov 2006 16:22:18 -0500 From: "Michael Gentry" To: cayenne-user@incubator.apache.org Subject: Re: Persistence and inheritance : a noob question In-Reply-To: <456CA158.1050401@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <456CA158.1050401@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Are you wanting multiple tables or a single table? Cayenne will currently do a single table mapped to multiple Java classes pretty well. You have to have a discriminator column (an int or a char, etc) which Cayenne can use to detect which Java class to create. Such as 1 = Customer, 2 = VIP, etc. /dev/mrg On 11/28/06, Landry Soules wrote: > Hello, > > I'm a new user of Cayenne, and am facing a design problem. Here it is : > I would like to implement the following : > - a Person abstract class (with first name, last name and so on > properties), extended by Customer and Vip classes. > In my mind, Person wouldn't be persistent, whereas Customer and Vip > would, meaning having only customer and vip tables. > Does this fit into the FAQ's CompositeVerticalInheritence, or does exist > a simpler alternative, since i must admit i didn't understand how to use > it ? > > Thanks > > Landry Soules >