>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.
Let me make sure I understand your problem. You've said creating a new child orphans the grandchildren. Why? Because the surrogate keys haven't been assigned until saving?
If so, I think I see an easy solution. Your appended records (at least parent and child) need temporary surrogate keys to be assigned when created in the buffer. End of problem?
HTH,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing