Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Bob,
>> Use Table Buffering on the child and grandchild. Cascade your save so the it saves from parent to child to grandchild... I would
even wrap the table updates into a transaction. <<
The buffering is not the problem, parent gets optimistic record, child and grandchild get optimistic table.
The problem, which I might not have expressed precisely, is what to do when the user has not yet saved the top-level parent. With a new, unsaved, parent, a new, unsaved, child, and new, unsaved grandchildren. When the user attempts to add a new child record, you must force the user to save at that point or the grandchild records to the first child are either lost or saved as orphans.
Forcing the save brings several problems. First, it might violate business rules, requiring at least one flag and a more complicated save routine. Second, the user loses the ability to Revert and discard the new work (Admittedly not the worst). Finally, it throws out counter-intuitive save messages to the user when she is told to save the parent just to add children.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement