Hi,
I have learnt that Hibernate uses "unsaved-value" property of "id" element to determine wether to insert or update a row.
How can we make Hibernate use a different attribute rather than id to determine wether to insert or update a row.
For example my data class is
public Customer
{
private String custRef = "";
private String saveMode= "";
private String address= "";
}
Database table has two columns (CUST_REF and ADDRESS).
I need hibernate to use the value of saveMode attribute of Customer class to determin wether to insert or update.
Can we do this with Hibernate.
Thanking You,
Chamal.
|