[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-958) hbm2java gegerate get method for property such as "xDirection" getxDirection

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Sat Jul 7 10:48:52 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27418 ] 

Max Rydahl Andersen commented on HBX-958:
-----------------------------------------

you are using an very old version. please use the latest, if the problem still occurs then:

a) use XDirection as the property name
b) attach a testcase 
c) attach a patch

Thanks.

> hbm2java gegerate get method for property such as "xDirection"  getxDirection
> -----------------------------------------------------------------------------
>
>                 Key: HBX-958
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-958
>             Project: Hibernate Tools
>          Issue Type: Bug
>          Components: hbm2java
>    Affects Versions: 3.2beta6
>         Environment: jdk1.5
>            Reporter: pa_ss
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> when define a property in hbm file as xDirection ,char[0] as lower as  char[1] is upper,  the hbm2java will generate getxDirection() as getter, instead of getXDirection as define in JavaBean.
> And at the same time , hibernate core will find the getter named getXDirection when build session factory, thus, error ocuur.
> I had read the source code in hibernate tool an hibernate core. The form use the code below
>  
> if(propertyname.length >1 and propertyname.char[1] is uppercase )
> {
>       return propertyname;
> }
> but hibernate core use
> if(propertyname.length >1 and propertyname.char[0] is uppercase and  propertyname.char[1] is uppercase )
> {
>       return propertyname;
> }
> so......
> thanks, best regards

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list