@@ -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,12 +960,19 @@ 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 {
970+ if (resultsInfo .isSingleRow ()) {
971+ long rowCount = DBUtils .readRowCount (monitor , session .getExecutionContext (), dataContainer , null , this );
972+ if (rowCount == 1 ) {
973+ return ;
974+ }
975+ }
969976 DBDRowIdentifier rowIdentifier = resultsInfo .getDefaultRowIdentifier ();
970977 checkRowIdentifier (resultsInfo , rowIdentifier );
971978 DBDAttributeBinding [] keyAttributes = rowIdentifier .getAttributes ().toArray (new DBDAttributeBinding [0 ]);
0 commit comments