Hi All,
Iam getting the following Exception:
Caused by: org.hibernate.TypeMismatchException: Provided id of the wrong type. Expected: class java.lang.Long, got class java.lang.Integer
My java class is as below :
public class PartyAddress implements Serializable {
/** attribute to store the relation between party and address. */
private Long partyAddressId;
.........
..........
}
My Mapping of the ID is as below:
<id name="partyAddressId" column="UNIQUE_PARTY_ADDRESS_ID" access="field" type="long">
<generator class="sequence" >
<param name="sequence">UNIQUE_PARTY_ADDRESS_ID_SEQ</param>
</generator>
</id>
When my code iterates through the set of PartyAddress objects
,I get the above excetion.
In the documentation it is specified that sequence will return integer,short or long values.Iam explicitly specifying the id to be long,but still I get the error.
Please help.
Thanks in advance
|