[email protected] wrote: > Paul, > > I realized that my last proposed change would not work. After looking into > it some more I realized the bizobj mementos was caching the changes. In > light of that, what do you think about the following.... > > I propose a change to the bizobj's so a child bizobj would auto update it's > parent bizobj record as changed, perhaps by adding a dictionary to the > bizobj, let call it "changed_Child_recs" > > Then when we updating memento we could do something like... > > if self.isChildbizobj: # > #Add an element to the parent's dictionary if not already there > self.Parentbizobj.changed_Child_rec[eval('self.Record.'+linkfield)]=True > > > Then in the getChangedRows method we could append self.changed_Child_recs to > self.__changedrows and undo the appropriate records without scanning all > records. Otherwise the scan as it is currently done forcec going to the > back end a zillion times fetching all the data for all the possible > combinations of child, grandchildren etc.
Making a dirty buffer flag like this in the bizobj layer is a decision we could make, but I don't like it. It's like using reference counting for garbage collection: messy and fraught with danger. However, I do see how it would speed up these checks. Let's get to the bottom of the problem. See my next post. Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[email protected]
