Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referential Integrity
Message
De
15/04/2009 08:44:22
 
 
À
14/04/2009 19:00:10
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01394872
Message ID:
01394939
Vues:
64
Hi Sam,
At my company framework level business object, I've set the Auto settings to true because that's just the way I think about objects. If a child is registered with a parent, then it should delete it's children when a parent deletes, etc. This removes the possibility of orphaned records. Setting it at the company framework level sets this as the default behavior for everyone.

As far as not deleteing because some children have records, I'm not sure why you would do this, but you may have a situation where you need to. Like you said, in the HookPreDelete(), you can iterate through the childbizobj collection and see if they have any records and return false if they do.

HTH,
Randy
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform