@@ -951,7 +951,7 @@ private void readCellDataValue(
951951 DBCExecutionContext executionContext = getExecutionContext (dataContainer );
952952 try (DBCSession session = executionContext .openSession (monitor , DBCExecutionPurpose .USER , "Generate data update batches" )) {
953953 DBDDataFilter dataFilter = new DBDDataFilter ();
954- addKeyAttributes (resultsInfo , row , dataContainer , session , dataFilter );
954+ addKeyAttributes (monitor , resultsInfo , row , dataContainer , session , dataFilter );
955955 WebExecutionSource executionSource = new WebExecutionSource (dataContainer , executionContext , this );
956956 dataContainer .readData (
957957 executionSource , session , dataReceiver , dataFilter ,
@@ -960,16 +960,21 @@ private void readCellDataValue(
960960 }
961961
962962 private void addKeyAttributes (
963+ @ NotNull DBRProgressMonitor monitor ,
963964 @ NotNull WebSQLResultsInfo resultsInfo ,
964965 @ NotNull WebSQLResultsRow row ,
965966 @ NotNull DBSDataContainer dataContainer ,
966967 @ NotNull DBCSession session ,
967968 @ NotNull DBDDataFilter dataFilter
968969 ) throws DBException {
969- DBDRowIdentifier rowIdentifier = resultsInfo .getDefaultRowIdentifier ();
970- if (rowIdentifier == null || rowIdentifier .isIncomplete ()) {
971- return ;
970+ if (resultsInfo .isSingleRow ()) {
971+ long rowCount = DBUtils .readRowCount (monitor , session .getExecutionContext (), dataContainer , null , this );
972+ if (rowCount == 1 ) {
973+ return ;
974+ }
972975 }
976+ DBDRowIdentifier rowIdentifier = resultsInfo .getDefaultRowIdentifier ();
977+ checkRowIdentifier (resultsInfo , rowIdentifier );
973978 DBDAttributeBinding [] keyAttributes = rowIdentifier .getAttributes ().toArray (new DBDAttributeBinding [0 ]);
974979 Object [] rowValues = new Object [keyAttributes .length ];
975980 List <DBDAttributeConstraint > constraints = new ArrayList <>();
0 commit comments