-->
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: Versioning question
PostPosted: Wed Feb 20, 2008 9:54 am 
Beginner
Beginner

Joined: Tue Jun 06, 2006 4:47 am
Posts: 25
I was thinking of using versioning, in a databound winforms environment, and I have come across a problem (in my head so far) which I cannot see a way around.

I think I need to keep a session open, due to the fact that I have a lazy loaded collection in my objects (think invoice header holding a list of invoice items): session disconnection would not work here.

My ideal solution would be to use versioning to see if anyone else has modified the invoice data whilst it has been modified by another user.

Should a version conflict occur, I want to display the object from the persistent store, and the edited object side by side, and ask the user whether to abandon changes, or commit to the persistent store.

Has anyone managed this scenario ?

Second problem associated with this:
It says in the NHib docs, to close the session upon an exception (think StaleObjectStateException). Now, couple this with a long running session with possibly many changes from various databound activities, any exception due to maybe only 1 version conflict, and all changes recorded in the session are gone ??
Is there any way to cancel the changes recorded in a session, for one object only ??

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.