Hi
Does hibernate always use the database identifier to figure out if an object is a detached one when I try to update an object thats present in the database? Is it possible for hibernate to use the java equality for that???
Okay, here is my problem. I have an object passed to the presentation layer for any edits to it by a user. I dont want to expose the database id to the user and hence I dont keep the db id in any hidden inputs on my .jsp page. Once the user is done with the edits, Webwork(using webwork in my project), creates a new object with the edits of the user. Once I pass that object to Hibernate for updating, I want hibernate to figure out that it relates to an object in the database even if the db id for this new object is null, by using java equality (I have implemented equals() & hashCode() method for this class using the business key). Is that possible at all???
Thanks a lot,
Neha.
|