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: Master Detail
PostPosted: Sun Jun 24, 2007 5:02 pm 
Newbie

Joined: Wed Jan 25, 2006 10:53 pm
Posts: 9
I have used NHibernate successfully in the past and want to use it again. I have a modeling question...


If I have a 'Company' object, which has a collection of 'Employee' objects. All fine, except, when there are 50000 employee's. What are peoples recomendations for modeling this? If I want to page through the employees, do I manage the paging in my service layer?

The way I am currently thinking is:

UI --> Presenter.LoadPage(companyId, pageNumber);
Presenter --> ServiceLayer.GetCompanyAndEmployees(companyId, pageNumber)
ServiceLayer --> RepositoryWithHibernate.GetCompany(1) & apply employee filter

Not sure I like it though, any thoughts? What other options do I have? I have seen some info from Udi Dahan on fetching strategies, but this seems to add datalayer knowledge into my service layer. Is this the only way to go.

Thanks for any comments

Tim


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.