From 383952c60eca2a551145e95ede92aba27204ee7a Mon Sep 17 00:00:00 2001 From: Ainur <59531286+yagudin10@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:45:13 +0300 Subject: [PATCH] CB-5838 check all row identifiers fix (#3014) Co-authored-by: DenisSinelnikov <142215442+DenisSinelnikov@users.noreply.github.com> --- .../service/sql/WebSQLQueryDataReceiver.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLQueryDataReceiver.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLQueryDataReceiver.java index 89bdc1e5f1..3a53466590 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLQueryDataReceiver.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLQueryDataReceiver.java @@ -35,10 +35,7 @@ import org.jkiss.utils.CommonUtils; import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; class WebSQLQueryDataReceiver implements DBDDataReceiver { @@ -170,8 +167,9 @@ public void fetchEnd(@NotNull DBCSession session, @NotNull DBCResultSet resultSe webResultSet.setSingleEntity(isSingleEntity); - DBDRowIdentifier rowIdentifier = resultsInfo.getDefaultRowIdentifier(); - webResultSet.setHasRowIdentifier(rowIdentifier != null && rowIdentifier.isValidIdentifier()); + Set rowIdentifiers = resultsInfo.getRowIdentifiers(); + boolean hasRowIdentifier = rowIdentifiers.stream().allMatch(DBDRowIdentifier::isValidIdentifier); + webResultSet.setHasRowIdentifier(!rowIdentifiers.isEmpty() && hasRowIdentifier); } private void convertComplexValuesToRelationalView(DBCSession session) {