There was a post last week about limiting db queries when using CFC's that return array's of objects, or something to that affect.
My question is, how feasible is this? For example, if I have a Team CFC, which has a method of getTeamMembers(). I want this method to return of Person objects. I can then loop through this array and do whatever it is I want to do. The problem is if the getTeamMembers() method has to initialize each Person CFC, and the initialize function makes 1 DB call to get that users information, I could potentially be making 10-20 DB calls just to create my TeamMembers array. This invariably gets worse if the Person CFC has another method which runs the init() method of some other CFC. Is there a better way to do this? Like only initializing the data when it gets accessed? Or running a specific query which will populate an array of Person CFC's so it is only 1 DB hit? Any ideas? Thanks, Cedric ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209143 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

