Hibernate version: 3.2.1
Hibernate annotation version: 3.2.0
Hi there,
I have recently upgraded from hibernate 2.1.7 to 3.2.1.  The migration was very smooth except for one problem which I suspect is of my own making but I can't find a way round it.
Previously I used .hbm.xml files.  An example property looked like this
Code:
    <property name="ActId" column="act_id" type="int" not-null="true" />
Note the ActId starts with an uppercase letter.
Converting to Hibernate 3 and using annotations now the property name has changed to actId.
Here's the annotation used.
Code:
    @javax.persistence.Basic
    @javax.persistence.Column( name = "act_id", nullable = false )
    @org.hibernate.annotations.Type( type = "int" )
    public int getActId() { return this.ActId; }
    public void setActId(int val) {this.ActId = val; }
This of course means all my queries that use a property name are failing because the case has changed.
I couldn't find anyway using annotations to override the property name so it matches what I had before.  I've poked through all the javax.persistence and org.hibernate.annotations packages but to no avail.
Is this possible or will I have to fallback to the xml files or change all my HQL queries?
Regards,
Mike
P.S. I know the ActId property is probably wrong but after 3 years of accumulated HQL queries I'm kinda stuck with it.