From: <leg...@at...> - 2003-10-01 15:03:20
|
The following issue has been updated: Updater: Gavin King (mailto:ga...@in...) Date: Wed, 1 Oct 2003 10:02 AM Comment: This is not a bug. It is known and intended functionality. Perhaps we could provide for both property naming conventions, since the JavaBeans spec seems a bit unclear on this point. Changes: type changed from Bug priority changed from Critical --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-373&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-373 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-373 Summary: problem in the ReflectHelper leads to "could not find getter" Type: Improvement Status: Unassigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: Sherban Popescu Created: Wed, 1 Oct 2003 6:05 AM Updated: Wed, 1 Oct 2003 10:02 AM Environment: Win 2000 Description: If one has a variable like: aEndTerminal The getter/setter are generated corectly by the code generator, BUT: Because the getter/setter changes aEndTerminal to AEndTerminal, we got into this later on: net.sf.hibernate.PropertyNotFoundException: Could not find a getter for aEndTerminal in class com.im.Trail at net.sf.hibernate.util.ReflectHelper.getGetter(ReflectHelper.java:206) at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:571) at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:665) at net.sf.hibernate.persister.PersisterFactory.create(PersisterFactory.java:29) at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:207) at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:627) at com.im.Main.initHibernate(Main.java:42) at com.im.Main.go(Main.java:48) at com.im.Main.main(Main.java:35) Exception in thread "main The problem is Introspector.decapitalize() It has a "special case" that we're hitting, quote from javadoc: " This normally means converting the first character from upper case to lower case, but in the (unusual) special case when there is more than one character and both the first and second characters are upper case, we leave it alone." I've created a copy of Introspector.decapitalize inside ReflectHelper.java without the "special case" , replaced all calls to Introspector.decapitalize with my new 'decapitalize' and all works like a charm. So in my opinion Introspector.decapitalize should not be used in the RelectHelper !!! This kind of bug surfaces when the variable begins with one single lower case character followed by an upper case character !! Thanks, --sherban --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |