Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populating foreign keys
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Populating foreign keys
Divers
Thread ID:
00810787
Message ID:
00810787
Vues:
51
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform