cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: various exceptions with cayenne 1.2RC2
Date Wed, 28 Jun 2006 15:01:58 GMT

On Jun 28, 2006, at 3:46 PM, Robert Zeigler wrote:

> Interesting. I've created a bug report  and attached a reproducible  
> test
> case.


> 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.


View raw message