General information
Category:
The Mere Mortals Framework
Jason:
This appears to be on the right track! I traced the code from the new, and sure enough a record IS added to the child table. However, the parent ID is never propogated to the child, and the requery sure enough does a table revert, eliminating the new record. Since this is obviously not the way things are intended to work (at least from my read on the docs), I am wondering if I missed a step somewhere, or this is a known bug? The alternatives I see now are as follows:
1. Modify the framework to trap for the IsNew() condition you describe
2. Trap for the condition and insert the records in the child manually, rather than automatically, though I am not certain this will avoid the requery situation.
As you and I am sure others have come across this situation, it would seem reasonable that there must be some preferred steps to accomplish this without breaking the framework which I am loathe to do.
Is your method of testing the IsNew() done as part of the requery hook, or have you found it necessary to modify the framework directly?
Thanks for helping me find the path!
Robert
>Have you stepped through the code to be sure New() isn't firing at all on the child? The reason I ask is that I remember there used to be an issue with setting the child's nRequery property to 1, if it's also set to create a new record when the parent adds a new record. Turns out that immediately after adding the new child record, the requery would trash it. We ended up adding code to test for IsNew() in the requery and it seemed to work.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only