Paul McNett wrote: > Ed Leafe wrote: >> On Mar 19, 2007, at 5:20 PM, Ed Leafe wrote: >> >>> That sounds wrong. New, unchanged records in the cursor should be >>> discarded. I wonder if any of the memento optimizations that were >>> done recently overlooked this case. >>> >>> I'll look into it some more and get back to you. >> OK, I think I found the problem. The new code is assuming that a new >> row is "changed"; it's not even bothering to check its memento: >> >> def isChanged(self, allRows=True): >> if allRows: >> return len(self._mementos) > 0 or len(self._newRecords) >> > 0 >> >> The code also shows that the memento for the new row doesn't include >> the default values, which is wrong. Guess I have to dig a lot deeper >> to straighten this out.
Ok, let me get this straight. You are saying that if I do a biz.new(), but don't change any fields, the biz should never save that record to the database? I'm not being argumentative, I'm really wondering if this is what is desired because it goes against my own assumptions (if I ask for a new record, I then expect that new record to want to get saved even if I don't make changes to it, assuming the bizrules allow that, which by default they would). -- pkm ~ http://paulmcnett.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
