Nuri,
>How can we manage Foreign Key (FK) fields in a MyBusinessClass::mmBusinesClass? Why do we need is; We are using ForeignParentKeyField for one foreign key column but our some tables have got more than one FK.
Although mmBusinessObject is currently anticipating a single field for the parent primary key, you can easily extend the class to work with multiple key fields. Here's what you can do:
1. In your company-level subclass of mmBusinessObject, add a new string array property called ForeignParentKeyFields (note it's plural).
2. Override the PopulateForeignParentKeyField() method, and in the override, check first if there are any values in the new ForeignParentKeyFields property, if there are, loop through the values and call this.PopulateKeyField() for each value. If the ForeignParentKeyFields array property is empty, then simply call the base class PopulateForeignParentKeyField method like this:
base.PopulateForeignParentKeyField();
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