Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Foreign Key Fields in BO
Message
De
08/09/2005 13:49:56
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Multiple Foreign Key Fields in BO
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01047795
Message ID:
01047795
Vues:
60
The framework only has a ForeignParentKeyField property.
How can I handle the case whereby an object has multiple Foreign Parent Keys?

I would like to emulate the same BO handling (from the MM.NET Dev Guide):
When you establish a parent/child relationship between business objects and have specified to AutoSaveOnParentSaved, you can have MM .NET automatically populate the child business object's parent key field with the parent's current primary key value. To do this, simply set the child business object's ForeignParentKeyField property to the name of the key field in the child object's default table that contains a pointer to the parent's primary key field.

Additionally, how can a code the HookParentRetrieved and HookParentNavigated to work with multiple Foreign Key Parent fields? Will something like the following work?

Protected Overrides Sub HookParentRetrieved(ByVal bisObj As mmBusinessObject, ByVal e As mmBusinessStateChangeEventArgs)
Me.GetDocumentItems( _
CInt(e.PrimaryKeyValues.GetValue(0)), CInt(e.PrimaryKeyValues.GetValue(1)))
End Sub
THANKS
Joe Salvatore, Programmer/Analyst - The Stellar Group
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform