[
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
Thank you for the suggestions, Kevin. I have attached a new patch that includes
the line referring to the section of the JavaBeans section that should be
explaining the naming convention.
According to my understanding, the scenario where the field name is a_Start
should yield the getter name getA_Start(). To double check, I generated the
getter/setter in Eclipse and that's what gets generated by default (granted
Eclipse isn't always correct). In the JUnit test, I indirectly test this by
having a letter then a number.
I am glad you pointed out the ReverseMappingTool. I went in and made a minor
change in the CodeGenerator class so that the getters and setters follow the
correct naming convention. I ran the tool and it generated the classes
correctly.
> 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, 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)