Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 1865 invoked from network); 29 May 2005 19:47:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 May 2005 19:47:12 -0000 Received: (qmail 17397 invoked by uid 500); 29 May 2005 19:47:12 -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 17381 invoked by uid 99); 29 May 2005 19:47:12 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from outmx013.isp.belgacom.be (HELO outmx013.isp.belgacom.be) (195.238.3.64) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 29 May 2005 12:47:10 -0700 Received: from outmx013.isp.belgacom.be (localhost [127.0.0.1]) by outmx013.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id j4TJkvrq017086 for ; Sun, 29 May 2005 21:46:57 +0200 (envelope-from ) Received: from jpox (58-227.246.81.adsl.skynet.be [81.246.227.58]) by outmx013.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id j4TJkrRk017049; Sun, 29 May 2005 21:46:53 +0200 (envelope-from ) From: To: Cc: "'JDO Expert Group'" Subject: RE: Issue 119: cannot add a constraint to a join table Date: Sun, 29 May 2005 21:47:19 +0200 Message-ID: <002901c56487$39632a90$0100a8c0@jpox> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-reply-to: <28d1eeaa6a40ef108da99fd9ac033f6e@Sun.COM> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N It's supported under class elements, but IMO it's cleaner and straight forward to set the constraints and whatever related inside the associations . The declaration under class implies that we always have cardinality greater than 1 for any element, like primary-key. ... ... ... It doesn't look good to me, and more, we can set primary-key or other constraints for any table wherever we are. ... ... ... Erik Bengtson -----Original Message----- From: Craig Russell [mailto:Craig.Russell@Sun.COM] Sent: Sunday, May 29, 2005 9:09 PM To: Abe White Cc: JDO Expert Group; jdo-dev@db.apache.org Subject: Re: Issue 119: cannot add a constraint to a join table Hi Abe, Learn something every day. So in order to define a primary key constraint on a join table, I'll have to amend my primary-key proposal to include multiple column elements and name= and table= attributes. Thanks, Craig On May 29, 2005, at 11:56 AM, Abe White wrote: >> Sorry, Abe, I should have reiterated the subject in the text. I'm >> talking about the fact that you cannot define constraints for join >> tables and tables used to contain Map and List fields. It's possible >> to define constraints on mapped columns of classes. > > Sure you can. That's why the class-level constraint element have a > "table" attribute. > > Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:Craig.Russell@sun.com P.S. A good JDO? O, Gasp!