Open quaff opened 8 months ago
I also ecountered this using "org.springframework.boot:spring-boot-starter-data-mongodb"
Thank you @quaff for reporting and adding the test snippet. The current behaviour, though unintuitive, is the expected one. The findBy
method in this case exposes the FetchableFluentQuery
outside the repository. So when the stream
invocation happens the context is already gone.
We're considering to enhance the current flow so that we capture method metadata early and can provide it later on in this scenario.
Meanwhile you can try it this way repository.findBy((root, query, cb) -> null, FetchableFluentQuery::stream)
.
Meanwhile you can try it this way
repository.findBy((root, query, cb) -> null, FetchableFluentQuery::stream)
.
Thanks, it works, does the document mention such limitation?
Unfortunately not, all samples are using one of the terminating (one
, first
, all
,...) methods.
Here is test case:
with