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

Stream<Object[]> missing result attributes on Hibernate [DATAJPA-903] #1258

spring-projects-issues opened this issue May 24, 2016 · 1 comment
type: bug


Copy link

@spring-projects-issues spring-projects-issues commented May 24, 2016

Andrey Karayvansky opened DATAJPA-903 and commented


    @Query("select 1,2,3,4 from Offer")
    Stream<Object[]> streamQuery();

    @Query("select 1,2,3,4 from Offer")
    List<Object[]> listQuery();
    public void listVsStreamQuery() throws Exception {
        List<Object[]> res1 = testRepo.listQuery();
        List<Object[]> res2 = testRepo.streamQuery().collect(Collectors.toList());

        assertEquals(res1, res2);

ER. The above test passes.
AR. The above test fails. res1 contains [[1,2,3,4]], res2 contains [1] (only first argument).

Is this a known limitation of streaming approach?
Hibernate is the ORM provider. Using springBoot 1.3.3.RELEASE.

Affects: 1.9.4 (Gosling SR4), 1.10.1 (Hopper SR1)

Referenced from: commits 6a51f4c, e8e7870, 9d0b487

Backported to: 1.10.2 (Hopper SR2), 1.9.5 (Gosling SR5)

Copy link

@spring-projects-issues spring-projects-issues commented May 25, 2016

Oliver Drotbohm commented

That should be fixed in the latest snapshots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
type: bug
None yet

No branches or pull requests

2 participants