I totally agree, I don't forsee any perf. problems.Could you elaborate on what 
you mean by this:
>>more efficient SQL update query. it would be internal to the domain model, 
>>not affecting othe rparts of the applicationI realise this has nothing to do 
>>with NHibernate but I am curious as to how I would nicely integrate the SQL 
>>in the way you are [EMAIL PROTECTED]



Date: Wed, 17 Sep 2008 00:32:18 +0300From: [EMAIL PROTECTED]: [EMAIL 
PROTECTED]: [nhusers] Re: reordering a list
I'd say - good ol' OO.class Section {...    ReadOnlyCollection<Question> 
Questions ...   void DeleteQuestion(Question q) {      questions.Remove(q);     
 ReorderQuestions();   }}now ReorderQuestions() could be as simple as looping 
through the questions. once you hit a perf problem you can switch that into a 
more efficient SQL update query. it would be internal to the domain model, not 
affecting othe rparts of the application.
On Wed, Sep 17, 2008 at 12:27 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
hi,I have a standard object that contains a collection ofsections.  Each 
section has a collection of questions.Each question has a display order for 
example:Q1's display order is 1.1Q2's display order is 1.2Q3's display order is 
1.3Q4's display order is 1.4If I delete Q2, I need to reorder the display order 
so itreads:1.11.21.3They are all Nh objects.What is the best way to handle the 
updates with NHibernste?-- Ken 
Egozi.http://www.kenegozi.com/bloghttp://www.musicglue.comhttp://www.castleproject.orghttp://www.gotfriends.co.il_________________________________________________________________
Make a mini you and download it into Windows Live Messenger
http://clk.atdmt.com/UKM/go/111354029/direct/01/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to