Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populating foreign keys
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Populating foreign keys
Miscellaneous
Thread ID:
00810787
Message ID:
00810787
Views:
49
I'm having trouble understanding how to correctly configure a parent/child pair of business objects so that the child object gets the parent foreign key upon saving the dataset. I've got a web form with the business objects set up in a parent/child manner:

// Register business objects.
this.oPerson = (Person) this.RegisterBizObj(new Person());
this.oPersonName = (PersonName) this.RegisterBizObj(new PersonName());
this.oPerson.RegisterChildBizObj(this.oPersonName);

In the child object (oPersonName) I've also set the "ForeignParentKeyField" to the parent primary key field, "person_uid". Still, when I call SaveData() it does not migrate the parent key to the child record (which is done by "PopulateForeignParentKeyField()"). Have I mistunderstood how this works, or maybe I didn't do something correctly?

If anyone has an example, I'd very much like to see one.
Brian Burlingame
Software Engineer/Consultant
Olympic Consulting Group
brian.burlingame@ocgworld.com
Next
Reply
Map
View

Click here to load this message in the networking platform