I use myeclipseide-3.8.4
I try to use hibernate, created hibernate mappings from tables in an SQLServer.
I run into a problem:
net.sf.hibernate.PropertyNotFoundException: Could not find a setter for property aId in class model.TProcessstatus
so let’s look at the code I have.
first: the generated maping
<class name="TProcessstatus" table="t_processstatus">
<id name="aId" column="a_id" type="java.lang.Integer">
<generator class="native"/>
</id>
<property name="aName" column="a_name" type="java.lang.String" />
<property name="aDeleted" column="a_deleted" type="java.lang.Short" />
<set name="tOrdersSet" inverse="true">
<key column="a_processstatus_id"/>
<one-to-many class="TOrders"/>
</set>
</class>
and the generated java code
/** The composite primary key value. */
private java.lang.Integer aId;
/**
* Return the simple primary key value that identifies this object.
* @return java.lang.Integer
*/
public java.lang.Integer getAId()
{
return aId;
}
so, there is obviously a mismatch:
in the XML the property is named “aId” -> this seems to result in a getter like “getaId()”. but in the java code the actual getter is “getAId()”
So, whom’s foult is this? Mine (Me?), MyEclipseIde, hibernate?
And how to solve this issue?
thanks
Jens