Skip to content

.stream() cannot be used with Document.class type [DATAMONGO-2323] #3180

Closed
@spring-projects-issues

Description

@spring-projects-issues

Jean-Pierre Bergamin opened DATAMONGO-2323 and commented

It's possible to use the MongoTemplate's find method to get org.bson.Document entities like:

mongoTemplate.find(myQuery, Document.class, "my_collection")

The same is not possible with the stream method:

mongoTemplate.stream(myQuery, Document.class, "my_collection")

A MappingException is thrown: "Couldn't find PersistentEntity for type org.bson.Document".

I would expect using Document as a type also when calling .stream()


Affects: 2.1.9 (Lovelace SR9)

Backported to: 2.1.10 (Lovelace SR10)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions