-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: my application anomoly with hibernate session.update
PostPosted: Wed Sep 17, 2008 9:42 am 
Newbie

Joined: Wed Sep 17, 2008 9:10 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.