Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design Question?
Message
 
To
18/09/2004 14:12:33
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00943758
Message ID:
00944382
Views:
13
Terry,

>I would like to get some opinions on how to use MM biz objects to add relational data in a batch process.
>How would you design a method to add invoice and invoice line records from a query of Orders and order lines using MM biz objects? OrderBiz, OrderLineBiz, InvoiceBiz ,InvoiceLineBiz
>
>From what I have learned so far, I don’t think MM biz objects can be used in this scenario because they do not handle batch updates of foreign keys. I hope I’m wrong and someone can point me in the right direction. ADO.NET will handle cascading keys and I know I can write all the code to accomplish this but I would like to maximize the MM biz objects.

Are you storing the primary key of the parent into the child records? If so, you can register one business object as the child of another business object, and set the ForeignParentKeyField property of the child to the corresponding parent object's primary key field. When you do this, the PopulateForeignParentKeyField() method is automatically called when the child records are saved.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform