Is there a recommended method to set up Parent Child Business object relationships when there are A LOT of children. I would like a collection of children in the parent, but if there are 500-600 children, I don't want to load them when I get the parent and then cart them around, especially if I don't need them. Specifically, I have an Order-Detail scenerio but most orders can have several hundred details. The optimal solution would be to have the collection property but not populate it unless we needed something from it, but I don't see an easy way to do that without losing CSLA functionality
Also, it would be nice to have a collection of Orders within each Customer. Yikes..
Any suggestions would be appreciated. This is my first project with CSLA so if I'm asking something that is covered in the book, a point in the right direction would be appreciated.
Andy,
Thanks for the reply. I'm not sure what you mean by "lazy load". I have considered having the detail collection property in the Order, but not popluating it until it was needed and maybe pulling down a count of them from the DB when the Order is loaded. I would have to fiddle with the dirty properties and add code so a Save of the order would not need the details. The idea of creating Info objects in addition to the full object doesn't appeal.
The performance issue is a concern considering that if the order were passed to a server and back it would have to serialize and deserialize all the details every time.
Is "ROL" RootObjectList? Sort of like a pick list for the Orders filtered by Customer?
Thanks
Gary
Copyright (c) Marimer LLC