Skip to content

Commit

Permalink
bug: fix the conversion from Document to DocumentEntity
Browse files Browse the repository at this point in the history
Signed-off-by: Maximillian Arruda <dearrudam@gmail.com>
  • Loading branch information
dearrudam committed Jun 7, 2023
1 parent 6935791 commit 23d28f1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ DocumentEntity toEntity() {
List<Document> documents = map.keySet().stream()
.map(k -> toDocument(k, map))
.collect(Collectors.toList());
DocumentEntity entity = DocumentEntity.of(collection, documents);
DocumentEntity entity = DocumentEntity.of(collection);
documents.forEach(d-> entity.add(d.name(),d.value()));
entity.remove(EntityConverter.ID_FIELD);
entity.remove(EntityConverter.ENTITY);
entity.add(id);
Expand Down

0 comments on commit 23d28f1

Please sign in to comment.