diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java index 04abd49275..63fa4a8692 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java @@ -795,6 +795,10 @@ public Object convertInputCellValue(DBCSession session, DBDAttributeBinding upda cellRawValue, false, true); + //FIXME: fix array editing for nosql databases + if (realCellValue == null && cellRawValue != null && updateAttribute.getDataKind() == DBPDataKind.ARRAY) { + throw new DBCException("Array update is not supported"); + } } catch (DBCException e) { //checks if this function is used only for script generation if (justGenerateScript) { @@ -1140,7 +1144,8 @@ private static DBCExecutionPurpose resolveQueryPurpose(DBDDataFilter filter) { return filter.hasFilters() ? DBCExecutionPurpose.USER_FILTERED : DBCExecutionPurpose.USER; } - private Object setCellRowValue(Object cellRow, WebSession webSession, DBCSession dbcSession, DBDAttributeBinding allAttributes, boolean withoutExecution) { + private Object setCellRowValue(Object cellRow, WebSession webSession, DBCSession dbcSession, DBDAttributeBinding allAttributes, boolean withoutExecution) + throws DBException { if (cellRow instanceof Map) { Map variables = (Map) cellRow; if (variables.get(FILE_ID) != null) { @@ -1153,14 +1158,14 @@ private Object setCellRowValue(Object cellRow, WebSession webSession, DBCSession var file = Files.newInputStream(path); return convertInputCellValue(dbcSession, allAttributes, file, withoutExecution); } catch (IOException | DBCException e) { - return new DBException(e.getMessage()); + throw new DBException(e.getMessage()); } } } try { return convertInputCellValue(dbcSession, allAttributes, cellRow, withoutExecution); } catch (DBCException e) { - return new DBException(e.getMessage()); + throw new DBException(e.getMessage()); } } }