Hi,
I have started using csla framework recently. I have a table that is having one to many relationship with several tables. When i create an object of the master table i dont want to fill all my child objects collection except one. So I am using lazy loading for this purpose. My doubt is "the one child object collection which i need to fill, all the time i retrieve the parent object, should i do that
- in a single stored procedure by returning two REF CURSOR's one with parent details and the other one with child collection and assign it to the corresponding object and object collection (for child) inside DataPortal_Fetch method inside parent class
- Fetch just the parent object in DataPortal_Fetch of parent object class and then do a second trip to the database to find the child collection of that parent and bind it in the DataPortal_fetch method inside child object
If i do it the first way is there anything wrong? I was thinking i could save one trip to the database by implementing it the first way
I would like to know the best way to do it using CSLA framework.
Thanks
Simi Sreedharan