The mapping is as follow
Code:
<hibernate-mapping>
<class name="eg.Employee" table="EG_EMPLOYEE">
<id column="USER_ID" name="userId" type="string" length="32">
<generator class="assigned"/>
</id>
<property column="NAME" name="name" type="string" length="64"/>
...
</class>
</hibernate-mapping>
The bean object is as follow
Code:
public class Employee {
/** identifier field */
private String userId;
...
public String getUserId() { return userId;};
public void setUserId(String uid) { this.userId = uid;}
}
Is it due to how we have identified USER_ID as
id in hbm.xml and hence in HQL "employee.id" will always referenced that field?