Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting Children
Message
De
15/02/2002 19:49:20
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Deleting Children
Divers
Thread ID:
00621025
Message ID:
00621025
Vues:
47
I'm sitting here trying to model some behavior, and I'm realizing I don't know what I would guess is a fundamental concept for MM: Deleting child records of a parent business object.

I'm finding that I'm adding so much functionality to the base MM classes, that I have to question my methodology. So I'm asking for other ideas.

Here's what I'm doing: I came to the realization that I'm going to need to perform child operations for many things, not just deletions. So I added a method to my subclass of kBizObj called doevent() (this is all just in UML - haven't tried it out yet). I also created a new property, aChildrenBizObj, which is a collection of children which can be associated with this bizobj. So if I call this.doevent('deletechildren'), it will run through all the children in the aChildrenBizObj collection and call their deletechildren() methods.

I looked into using event objects, but it seemed best to keep it in the business object, to centralize control.

Is this nuts? Is there an easier way to do it?

I know I could use referential integrity, but I'm trying to centralize all rules in code, to facilitate future upsizing to other backends. And besides, as I said above, there are so many other things that I'm going to want to apply to all children.

Any thoughts or suggestions?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform