After reading as much documentation as possible, and forums and google, I cannot come up with an answer to this problem.
I have an object that uses assigned key for identifier. I have used the version tag to identify whether this is a save or update command. All of this works correctly in hibernate the way it is documented... I would like to be able to do the following:
set the assigned key
call update (like the sql update would work)
receive rows affected back
I know from our application if a row should be updated in the database before hibernate knows. I don't want to do a select first, because of obvious efficiency problems. I would be able to identify if the update didn't work if the rows affected returned 0. (Basically the same way that query.executeUpdate works...except having the ability to call from session using the object rather than a query)
After reading for quite a long time, I can't seem to find anything like this in Hibernate. Have I overlooked something? I can't seem to find a workaround or any method that would do this.
I have tried to explain myself clearly. Please ask for more clarification if I have not made any sense.
Thanks