Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A74BC92FC for ; Tue, 6 Nov 2012 10:06:29 +0000 (UTC) Received: (qmail 52502 invoked by uid 500); 6 Nov 2012 10:06:29 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 52106 invoked by uid 500); 6 Nov 2012 10:06:21 -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 52068 invoked by uid 99); 6 Nov 2012 10:06:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 10:06:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [216.180.54.1] (HELO fly.hiwaay.net) (216.180.54.1) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 10:06:10 +0000 Received: from [10.20.30.64] ([216.180.54.218]) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id qA6A5lc9031897 for ; Tue, 6 Nov 2012 04:05:48 -0600 Message-ID: <5098E0FB.7090802@gdcjk.com> Date: Tue, 06 Nov 2012 04:05:47 -0600 From: Garth Keesler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: "'user@cayenne.apache.org'" Subject: Class Relation vs Foreign Key Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Should/must the name used when defining a relation between classes in Modeler be the same as the name used when defining a foreign key in the database? As a follow-up, does Cayenne even use FKs or does it depend on its own class definitions and indexes in the database to accomplish this? This is in hand-coded class definitions instead of generating the classes from the database schema. If FKs are used, how is the correlation between relations and foreign keys made or does Cayenne depend on the database software to use the appropriate foreign key automagically? Thanx, Garth