Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 1636 invoked from network); 4 Jun 2007 06:10:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jun 2007 06:10:17 -0000 Received: (qmail 57592 invoked by uid 500); 4 Jun 2007 06:10:21 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 57576 invoked by uid 500); 4 Jun 2007 06:10:20 -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 57567 invoked by uid 99); 4 Jun 2007 06:10:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2007 23:10:20 -0700 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 siberian@gmail.com designates 64.233.162.235 as permitted sender) Received: from [64.233.162.235] (HELO nz-out-0506.google.com) (64.233.162.235) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2007 23:10:14 -0700 Received: by nz-out-0506.google.com with SMTP id 18so2228421nzp for ; Sun, 03 Jun 2007 23:09:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=ZF8ud3KxRdFbh2MYrdG6pWZaBlvbQkwdZ0XFyNrFgZylS/pciOfVlrEvJVLO/TNbMsm0pH3RuncIqoNzEbIc/1jW/OHZVprfiJH3OIXerdGHlx8dTdH44l4kVR/hh16pOd6IsY0IEoZY5OWoXCBmyFI3nk+yN3YTomlTc37s6I4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=giIClOeu7usAT+xNz9M2XBg6kQd6JUdWsmD6s+w/ygwdonuKuoSiKdxDLfSMLXTJHDqyhUbuuI1L1HuM0GM8h7i5GguAFCPO9MURaoIfDkRK2JsDeXCRThOb+HX6lVvHryx44VBsh67pfzgYSwu5SCfjD2Psfzgb+mme9e2G1HA= Received: by 10.115.18.1 with SMTP id v1mr4530729wai.1180937390060; Sun, 03 Jun 2007 23:09:50 -0700 (PDT) Received: by 10.114.24.2 with HTTP; Sun, 3 Jun 2007 23:09:50 -0700 (PDT) Message-ID: <36e916ee0706032309k7cc2d43aifda8aef90923e545@mail.gmail.com> Date: Sun, 3 Jun 2007 23:09:50 -0700 From: "John Armstrong" To: user@cayenne.apache.org Subject: Creating Compound PKs MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Does Cayenne allow for the creation of a compound PK? I searched the archives and google more generally and could only find hints at this. The docs did not clarify either (although it was also hinted at. .I think, its a bit late :) ). My table looks like this: id name serverid status enabled I need to create a compound PK on name/serverid that will maintain uniqueness across these segments. My fallback is to create a validation that checks these before commit but my normal route in a non-ORM context is to let the DB enforce it and catch it there. Thanks! John-