Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 17576 invoked from network); 19 Jun 2007 16:50:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2007 16:50:50 -0000 Received: (qmail 37662 invoked by uid 500); 19 Jun 2007 16:50:53 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 37638 invoked by uid 500); 19 Jun 2007 16:50:53 -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 37629 invoked by uid 99); 19 Jun 2007 16:50:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 09:50:53 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_IMAGE_ONLY_20,HTML_MESSAGE,HTML_SHORT_LINK_IMG_3 X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [216.252.121.66] (HELO web43136.mail.sp1.yahoo.com) (216.252.121.66) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 19 Jun 2007 09:50:48 -0700 Received: (qmail 95006 invoked by uid 60001); 19 Jun 2007 16:50:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.sg; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=hJefwHmRmZwul50Yd+k/6+mS4x8Nb94OSYkkZAaYup/+eYUC0hREHd81ZoiHa/ZEwBJc9eg48Lk4aRkfyHcxy7hioJ1RMR5JDStkZlH9B9vuA85fwV+Nakt4B367gFtJgKJe2JBMHcwN3R/L7hwGOV4YDFnBMjCteVqJ8bES/AY=; X-YMail-OSG: g1f_ciQVM1kYYFN3RmGrlUxoo1xvsBtNe7.I7OVUDfWvaTBd6NlHtSGX2oF8_8QlpXCfB4eV2VBG1dYC3hsyjuLv_adObarbgEo.KDH1R_hdxgsnDA-- Received: from [202.156.13.3] by web43136.mail.sp1.yahoo.com via HTTP; Wed, 20 Jun 2007 00:50:26 CST Date: Wed, 20 Jun 2007 00:50:26 +0800 (CST) From: yongbl Subject: Re: Common attributes in the model To: user@cayenne.apache.org In-Reply-To: <525d8e10706181526m7019afe3jc9310d2d1f24494@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1053366589-1182271826=:94332" Content-Transfer-Encoding: 8bit Message-ID: <901285.94332.qm@web43136.mail.sp1.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1053366589-1182271826=:94332 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Malcolm, Is there a need to create DBEntity and ObjEntity for the superclass? Regards, James Malcolm Edgar wrote: Hi James, Yes you can. In the modeler, you define a common "Custom Superclass" under the DataMap "Entity Defaults". Make sure you custom superclass extends DataObject, and add your common attributes. You generated classes will then extend your common superclass. Make sure your DB Entities support these attributes. regards Malcolm Edgar On 6/18/07, yongbl wrote: > > Hi, > > I am new to Cayenne. In many of the models that I am using, there are > common attributes like created date, modified date, created by, etc. Is > there a right way to add the common attributes, other than manually adding > the common attributes in the models? > > It seems that I can't create a base model with the common attributes, > and extend the rest of the models from the base model, right? > > Regards, > James > > > --------------------------------- > Yahoo! Movies - Search movie info and celeb profiles and photos. --------------------------------- Real people. Real questions. Real answers. Share what you know. --0-1053366589-1182271826=:94332--