From 5821ca426351eb425655c98a4798147b220759c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20G=C3=B6rler?= Date: Tue, 3 Jun 2025 16:57:30 +0200 Subject: [PATCH 1/2] Document cds.Map type --- java/cds-data.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/cds-data.md b/java/cds-data.md index 8b6f7538e..b73737778 100644 --- a/java/cds-data.md +++ b/java/cds-data.md @@ -43,6 +43,7 @@ The [predefined CDS types](../cds/types) are mapped to Java types and as follows | `cds.Binary` | `byte[]` | | | `cds.LargeBinary` | `byte[]` | `java.io.InputStream` (1) if annotated with `@Core.MediaType` | | `cds.Vector` | `com.sap.cds.CdsVector` | for [vector embeddings](#vector-embeddings) | +| `cds.Map` | `java.util.Map` | for arbitray [structured data](#structured-data)(2) | ### SAP HANA-Specific Data Types @@ -62,6 +63,7 @@ To facilitate using legacy CDS models, the following [SAP HANA-specific data typ > (1) Although the API to handle large objects is the same for every database, the streaming feature, however, is supported (and tested) in **SAP HANA**, **PostgreSQL**, and **H2**. See section [Database Support in Java](./cqn-services/persistence-services#database-support) for more details on database support and limitations. +> (2) Serialized as JSON to a CLOB column or JSONB column (on Postgres) ::: warning The framework isn't responsible for closing the stream when writing to the database. You decide when the stream is to be closed. If you forget to close the stream, the open stream can lead to a memory leak. From 539d7f607558286bcff5a8e2954e49c7dd695aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20G=C3=B6rler?= Date: Tue, 3 Jun 2025 17:03:26 +0200 Subject: [PATCH 2/2] Update java/cds-data.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- java/cds-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/cds-data.md b/java/cds-data.md index b73737778..a897eea7a 100644 --- a/java/cds-data.md +++ b/java/cds-data.md @@ -43,7 +43,7 @@ The [predefined CDS types](../cds/types) are mapped to Java types and as follows | `cds.Binary` | `byte[]` | | | `cds.LargeBinary` | `byte[]` | `java.io.InputStream` (1) if annotated with `@Core.MediaType` | | `cds.Vector` | `com.sap.cds.CdsVector` | for [vector embeddings](#vector-embeddings) | -| `cds.Map` | `java.util.Map` | for arbitray [structured data](#structured-data)(2) | +| `cds.Map` | `java.util.Map` | for arbitrary [structured data](#structured-data)(2) | ### SAP HANA-Specific Data Types