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



Reply via email to