[ https://issues.apache.org/jira/browse/OPENJPA-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dalia Abo Sheasha updated OPENJPA-2467: --------------------------------------- Attachment: OPENJPA-2467.txt I have attached a patch that includes my fix to this issue. FieldMetaData now handles generating the correct setter name for any case where the second letter of the variable is capitalized. Otherwise, the old behavior is observed. I also added code to look for getters that use the correct naming convention. To test the changes, I created two entities. One uses the correct naming convention where a variable named tStart would have the corresponding gettStart(). The other entity uses the old wrong way of naming where tStart would have the corresponding getTStart() method. The second entity is there to make sure the old behavior is still supported. > No setter was found for method like tStart > ------------------------------------------ > > Key: OPENJPA-2467 > URL: https://issues.apache.org/jira/browse/OPENJPA-2467 > Project: OpenJPA > Issue Type: Bug > Components: jpa > Affects Versions: 2.2.2 > Reporter: Daniele Pirola > Assignee: Rick Curtis > Attachments: OPENJPA-2467.txt > > > Suppose having an entity class with fields like tStart, tEnd, tModify (with > second letter in upper case). The corresponding getter and setter are > gettStart and settStart, gettEnd, ... and not getTStart or setTStart. > Inside class PersistenceMetaDataDefaults use of StringUtils.capitalize in > method isDefaultPersistent generate the mistake. > Look at this pdf, section 8.8 > http://download.oracle.com/otn-pub/jcp/7224-javabeans-1.01-fr-spec-oth-JSpec/beans.101.pdf -- This message was sent by Atlassian JIRA (v6.1.5#6160)