Skip to content

Commit 23d28f1

Browse files
committed
bug: fix the conversion from Document to DocumentEntity
Signed-off-by: Maximillian Arruda <[email protected]>
1 parent 6935791 commit 23d28f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jnosql-elasticsearch/src/main/java/org/eclipse/jnosql/databases/elasticsearch/communication/ElasticsearchEntry.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ DocumentEntity toEntity() {
6060
List<Document> documents = map.keySet().stream()
6161
.map(k -> toDocument(k, map))
6262
.collect(Collectors.toList());
63-
DocumentEntity entity = DocumentEntity.of(collection, documents);
63+
DocumentEntity entity = DocumentEntity.of(collection);
64+
documents.forEach(d-> entity.add(d.name(),d.value()));
6465
entity.remove(EntityConverter.ID_FIELD);
6566
entity.remove(EntityConverter.ENTITY);
6667
entity.add(id);

0 commit comments

Comments
 (0)