-->
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.  [ 2 posts ] 
Author Message
 Post subject: NHibernate + nested unit of works
PostPosted: Wed May 02, 2007 10:25 am 
Newbie

Joined: Wed May 02, 2007 9:39 am
Posts: 1
Location: South Africa
Hi

We are currently investigating the feasibility of moving from our existing ORM vendor to NHibernate. One of the features of our existing ORM is that it supports the concept of nested unit of works. If the nested unit of work commits, the changes made are committed back into the parent unit of work and vice versa. All of this happens in memory and it is only when you commit the root unit of work that the changes are committed within a db transaction to the database. This gives us the ability to have multi-level undo functionality in our application which is one of our usability requirements.

I see that the ISession in NHibernate maps to the concept of a unit of work. I am however unable to assess with my current limited knowledge of NHibernate whether it is possible to accomplish the same nested unit of work functionality using NHibernate. Is this possible? How would one go about implementing this with NHibernate?

Thanks
Carel


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 03, 2007 3:05 am 
Newbie

Joined: Thu May 03, 2007 2:30 am
Posts: 18
Hello...

I think NHibernate will not support this for you. A Unit of Work should be a very short-lived thing, and not span any User Input. So I guess you need something else here.

Something you COULD look at is the CSLA framework. This Framework has a multi Level Undo implemented in its base Classes, and allows you to achieve exactly what you want. Also it can be used with NHibernate.

The "job" of CSLA is not persistence, but the Business Logic, so the 2 worlds wont have many overlaps. You can look at a recent DNRTV Episode to see a discussion about extracting the DAL from the framework and use DTO to load/save the data.


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

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.