Author: reinhard
Date: 2005-08-24 07:51:36 -0500 (Wed, 24 Aug 2005)
New Revision: 7876
Modified:
trunk/gnue-common/src/datasources/GDataSource.py
Log:
Attempt to fix the detail requery without primary key issue.
Modified: trunk/gnue-common/src/datasources/GDataSource.py
===================================================================
--- trunk/gnue-common/src/datasources/GDataSource.py 2005-08-24 12:40:15 UTC
(rev 7875)
+++ trunk/gnue-common/src/datasources/GDataSource.py 2005-08-24 12:51:36 UTC
(rev 7876)
@@ -574,7 +574,7 @@
# Requery an existing result set
# ---------------------------------------------------------------------------
- def _requeryResultSet (self, masterRecord, resultSet):
+ def _requeryResultSet (self, masterRecord, resultSet, commit):
"""
Requery data for an existing result set from the backend.
@@ -594,9 +594,17 @@
merged.
"""
- newResultSet = self.__createResultSet (masterRecord = masterRecord)
- resultSet._merge (newResultSet)
- newResultSet.close ()
+ if self.__rowidField or self.__primarykeyFields:
+ newResultSet = self.__createResultSet (masterRecord = masterRecord)
+ resultSet._merge (newResultSet)
+ newResultSet.close ()
+ else:
+ # We can't merge the resultsets without a key, so no use requerying at
+ # all. The call to resultSet.requery will just reset the status for all
+ # records and remove the deleted records from the cache.
+ # We can pretend there has been a commit in any case: The requery isn't
+ # done against the database anyway.
+ resultSet.requery (True)
# If this is the current result set, then the UI has to follow the changes.
if resultSet == self.__currentResultSet:
_______________________________________________
Commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue