Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 57895 invoked from network); 22 Jul 2006 17:24:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Jul 2006 17:24:04 -0000 Received: (qmail 40364 invoked by uid 500); 22 Jul 2006 17:24:03 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 40127 invoked by uid 500); 22 Jul 2006 17:24:03 -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 40118 invoked by uid 99); 22 Jul 2006 17:24:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Jul 2006 10:24:03 -0700 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 [64.124.179.102] (HELO polatsk.objectstyle.org) (64.124.179.102) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 22 Jul 2006 10:24:02 -0700 Received: (qmail 308 invoked from network); 22 Jul 2006 17:23:41 -0000 Received: from unknown (HELO ????cr??IPv6:::1?) (127.0.0.1) by localhost with SMTP; 22 Jul 2006 17:23:41 -0000 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <582a4b780607220846v4c14f14cm2919bd63f9ec609b@mail.gmail.com> References: <582a4b780607212335i5852a24bg8380cd11adc20504@mail.gmail.com> <582a4b780607220846v4c14f14cm2919bd63f9ec609b@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7155F681-79E4-4C41-B210-1214ED9154C1@objectstyle.org> Content-Transfer-Encoding: 7bit From: Andrus Adamchik Subject: Re: PK Column - Cayenne Modeler Date: Sat, 22 Jul 2006 13:23:41 -0400 To: cayenne-user@incubator.apache.org X-Mailer: Apple Mail (2.752.2) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N BTW, I suggest an upgrade to Cayenne 1.2 final - it has some Modeler glitches fixed. Andrus On Jul 22, 2006, at 11:46 AM, Rashid Khan wrote: > Thanks for the explanation, Michael. > > On 7/22/06, Michael Gentry wrote: >> For Report, you want report_id set as PK (I think this automatically >> checks Mandatory, too, since a PK must be mandatory). For Schedule, >> you want schedule_id set as PK. You don't mark FKs as a PK, but if >> the Report must belong to a Schedule, I'd mark Report's >> schedule_id as >> mandatory. If this is the case, you may also want to set up a >> cascade >> delete rule from Schedule -> Report to automatically delete all >> Reports when you delete a Schedule. (The delete rule for >> Report->Schedule would be no action.) >> >> /dev/mrg >> >> On 7/22/06, Rashid Khan wrote: >> > Hi, >> > >> > I am using cayenne-1.2RC1. I want to know in what kind of situation >> > the PK column in the modeler has to be checked. >> > >> > Let's say I have the following setup. >> > >> > 1. Report Table with columns: report_id, report_name, schedule_id. >> > (where schedule_id is a foreign key) >> > >> > 2. Schedule Table with columns: schedule_id, schedule_desc. >> > >> > Report >- Schedule (Many-to-one relationship) >> > >> > The modeler automatically checks the PK column for report_id. I am >> > confused whether to make the PK checked for schedule_id as well in >> > report db entity. >> > >> > I hope my question is clear. >> > >> > Thanks, >> > >> > Rashid Khan >> > >> >