dabo Commit
Revision 6932
Date: 2011-10-26 16:34:11 -0700 (Wed, 26 Oct 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6932

Changed:
U   trunk/dabo/biz/dBizobj.py

Log:
requeryAllChildren(), after my changes in r6917 yesterday, would result in
children being requeried even if there were changes. I changed it back to
the original behavior but left my note in for future improvements.


Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py   2011-10-26 23:26:03 UTC (rev 6931)
+++ trunk/dabo/biz/dBizobj.py   2011-10-26 23:34:11 UTC (rev 6932)
@@ -1424,11 +1424,10 @@
                                #                     2) _resetChildrenParent 
instead checked for child.RowCount == 0
                                # I think both are wrong. In #1, you'd never 
get a requery of that child if there was 
                                # one changed record in the hierarchy, plus 
there are performance issues in running
-                               # that check. In #2, you'd never get a child 
requery unless RowCount was 0. I'm leaving
-                               # both of those conditions out completely for 
now, although that is most certainly 
-                               # wrong as well, but at least we are now 
consistent in behavior between e.g. self.first()
-                               # and self.RowNumber = 0.
-                               if updateChildren and child.cacheExpired():
+                               # that check. In #2, you'd never get a child 
requery unless RowCount was 0.
+                               # I'm choosing #1, since we do want a requery 
but if there are changes we don't want
+                               # to erase them. We should revisit this. 
+                               if updateChildren and not 
child.isAnyChanged(useCurrentParent=True) and child.cacheExpired():
                                        child.requery()
 
 



_______________________________________________
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]

Reply via email to