with the following mapping document in mind, i'd like to be able to search using the following query:
"from BandLevel as bl where bl.id=:id"
however the closest i can get is this:
"from BandLevel as bl where bl.band_level=:id"
so briefly i can't get my query to use the field name of the bean, instead i can only use the column name the field maps to.
Is there a way to make hibernate map the field name?
Hibernate version: 2
Mapping document:
Code:
<class name="BandLevel" table="LU_BAND_LEVELS">
<composite-id>
<key-property name="id" column="BAND_LEVEL" type="string" length="8"/>
<key-property name="companyNo" column="COMPANY_NO" type="string" length="4"/>
<key-property name="employeeType" column="EMPLOYEE_TYPE" type="string" length="10"/>
</composite-id>
<property name="description" type="string" column="DESCRIPTION" length="80"/>
</class>
Name and version of the database you are using:oracle 8