Thanks Paul for your reply,
I guess I have not really understood your questions or maybe I am missing something.
What is the differernce between a Primary key and an ID (assuming your id is unique and unchanging)?
We have various Generated Ids that act as Primary Key. It is <b>Different</b> from the the Composite Unique keys that we are using.
It will treat the object as an existing object is you loaded it through Hibernate.
As I mentioned earlier, the Unique key in our tables is NOT the primary key.My limited understanding states that Hibernate would have treated the object as an existing object , if and only if,the Pkey is the same. However in our case, as we genearte a new Pkey Hibernate is NOT able to LOAD based on UNIQUE keys.
Hence my original question : Can we have our saveOrUpdate to be based on the 'UNIQUE' key instead of the Pkey. Is that possible ?
Thanks,
Milan Doshi