Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get/set methods for "sId"

 
Harathi Rao
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to know the getter/setter method names for the following variable.

int sId;

I have tried with getSID(), getSid() and getSId(). But its throwing exception in all the cases.

Your help would be appreciated.

Thanks
Harathi.
 
Paul Clapham
Sheriff
Posts: 21581
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem with a variable named "eMailAddress". I found this was a Hibernate FAQ (but I can't relocate the page that told me that). The FAQ said "Get over it" which suggests it's not something that can be fixed by the Hibernate people. I renamed the variable "emailAddress" and had no problems after that. In other words, don't give your variables names starting with a lower-case letter followed by an upper-case letter.
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the FAQ, with the lately-seems-typical-of-the-JBoss-group hostile wording you remembered.

Hibernate FAQ
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is not Hibernate per say, but java.beans.Introspector (who's decapitalize(String name) method they use). The Hibernate developers say they are reluctant to change this because Hibernate's behaviour with properties matches that defined in the JavaBean specification.
[ January 11, 2006: Message edited by: Paul Sturrock ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic