Actually, it is not possible to include a field with "timestamp" type in your composite-id because the TimestampType did not support it by nature(it did not support the getHashCode method) and it should not support it due to the different timestamp handling mechanisms by database vendors.
However, I resolve this issue by changing the type from "timestamp" to "calendar" in my Hibernate's mapping files which means that I also have to change the type from "java.util.Date" to "java.util.Calendar" in my POJOs.
--------------------------------------- MAPPING FILES
Code:
<property
name="approveDate"
type="date"
column="APRV_DT"
not-null="true"
>
</property>
to
Code:
<property
name="approveDate"
type="calendar"
column="APRV_DT"
not-null="true"
>
</property>
--------------------------------------- POJOS
Code:
private Date _approveDate;
to
Code:
private Calendar _approveDate;
I verified it by running my testcases passed. I hope it is helpful to you because I also encountered this issue and took a while to figure it out.