Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JPA 2.2 Query.getResultStream() [DATAJPA-949] #1300

Closed
spring-projects-issues opened this issue Aug 10, 2016 · 2 comments
Closed
Assignees

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Aug 10, 2016

Thomas Darimont opened DATAJPA-949 and commented

This is exposed via the org.hibernate.query.Query#stream() method
see:
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/query/Query.java#L88

The implementation can be found here:
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractProducedQuery.java#L1378

Perhaps one could adapt the Stream resource cleanup in Hibernate 5.2 to the current Stream support in Spring Data


Affects: 1.9.4 (Gosling SR4), 1.11 M1 (Ingalls)

Reference URL: https://hibernate.atlassian.net/browse/HHH-9340

Backported to: 2.0.1 (Kay SR1), 1.11.8 (Ingalls SR8)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 21, 2016

Oliver Drotbohm commented

We should have a look at this in the course of moving to Hibernate 5.2 for 2.0 M2

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Oct 5, 2017

Oliver Drotbohm commented

We're now using the JPA 2.2 native method via reflection in case it's on the classpath. Even more so, we also detect implementations of that method on Query implementation classes and invoke it if present (Hibernate 5.2 already ships with an implementation but still compiles against JPA 2.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants