Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 80682 invoked from network); 28 Jun 2006 15:02:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jun 2006 15:02:20 -0000 Received: (qmail 71530 invoked by uid 500); 28 Jun 2006 15:02:19 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 71510 invoked by uid 500); 28 Jun 2006 15:02:19 -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 71493 invoked by uid 99); 28 Jun 2006 15:02:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 08:02:18 -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; Wed, 28 Jun 2006 08:02:17 -0700 Received: (qmail 27360 invoked from network); 28 Jun 2006 15:01:56 -0000 Received: from unknown (HELO ?jR??G??IPv6:::1?) (127.0.0.1) by localhost with SMTP; 28 Jun 2006 15:01:56 -0000 Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: <44A29641.3000608@puregumption.com> References: <44A06597.1020101@puregumption.com> <8A80DACB-0A49-46C8-A042-0D1B05CDF009@objectstyle.org> <44A1481D.4040701@puregumption.com> <44A27F1F.9040102@puregumption.com> <3CE93D2B-9C6C-4840-872E-0A6BF6F4DBEB@objectstyle.org> <44A29641.3000608@puregumption.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <4BB116DB-D949-48E4-BAF2-C236F57DD33D@objectstyle.org> Content-Transfer-Encoding: 7bit From: Andrus Adamchik Subject: Re: various exceptions with cayenne 1.2RC2 Date: Wed, 28 Jun 2006 16:01:58 +0100 To: cayenne-user@incubator.apache.org X-Mailer: Apple Mail (2.750) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Jun 28, 2006, at 3:46 PM, Robert Zeigler wrote: > Interesting. I've created a bug report and attached a reproducible > test > case. Thanks! > Obviously, it's a simple matter for me to change my variable name. =) > But, given the situation: > X has a public "property" getX(), and a private field "x", doesn't it > seem reasonable that cayenne should be using getX(), rather than the > private x? Actually no. See Craig Russell's recent posts on a similar topic here - the framework has to have a backdoor access to the persistent objects and it has to be distinct from the user access. BTW JPA spec provides support for explicitly defining such policy (setters vs. direct field access, no matter whether the field is private or not). Another example would be Java serialization mechanism. > Otherwise, it seems, to me at least, that cayenne is > violating the contract of the "private" modifier. Andrus