I've got a set of classes which contain objects with names like yAxis, which are accessed through get/setYAxis(...) methods (note the capitalisation). When I attempt to map these fields with something like
Code:
<many-to-one name="yAxis" class="cedar.hepdata.model.YAxis"/>
I get a runtime error about not being able to find getter/setter methods for "yAxis". This implies that the capitalise-first-letter-of-field-name rule isn't being applied if the second letter is capitalised, and indeed if I change the field name to the non-standard "YAxis" in the source and the mapping file then it works. I'd rather not do this, though, and legacy code issues mean that we can't use a field name of "yaxis" and get/setYaxis methods either.
Anyway, I couldn't find this "don't-capitalise-if-second-letter-is-capital" behaviour described in the Hibernate or JavaBean documentation: the closest I found was that no change should apply if both the first two letters are capitals. Is there a way of forcing Hibernate to do what I want and is this the expected behaviour?
Thanks!
Andy
PS. I'm using Hibernate 3, before someone asks! Not entirely sure about the minor version, but I can't see any references to this issue in recent change lists.