cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugi Thordarson <>
Subject Re: For those of us who want getters without the get-prefix (e.g. EOF fugitives)
Date Sun, 17 Apr 2016 18:42:37 GMT
Whoa, yes—that’s true. I haven’t hit the issue, probably because I’m using WO which
uses Apple’s KVC rather than beanystuff to access and modify object data. And I believe
Cayenne is using the correct methods to access bean data in some cases, since creating BeanInfo
classes eliminated errors I was previously encountering (eg. when sorting lists of DataObjects).

But yes, as you point out, PropertyUtils.getProperty() fails for all of my properties since
BeanAccessor hardcodes the get-prefix. We should probably fix Cayenne to comply with the JavaBeans
spec in this regard.

- hugi

> On 17. apr. 2016, at 17:00, David Feshbach <> wrote:
> I think that will break PropertyUtils/BeanAccessor. BeanAccessor uses
> JavaBeans naming conventions but doesn't look at BeanInfo.
> On Thu, Apr 14, 2016 at 5:34 PM, Hugi Thordarson <> wrote:
>> Hi all,
>> if you’d like to drop the “get"-prefix from your DataObject accessor
>> methods, here’s a pom-file and a template to help. The pom/template
>> combination generates a BeanInfo class for each entity that java reads to
>> check the names of getter and setter methods. If you use this, Cayenne will
>> function perfectly with getter methods that don’t include the “get”-prefix.
>> I included the wosuperclass-template which generate EOF style DataObject
>> classes, just to make the example complete.
>> - hugi

View raw message