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

Query methods returning an aggregate implementing Streamable considered collection executions #2869

Closed
odrotbohm opened this issue Jun 30, 2023 · 0 comments
Assignees
Labels
in: repository Repositories abstraction type: bug A general bug

Comments

@odrotbohm
Copy link
Member

odrotbohm commented Jun 30, 2023

Given an aggregate

class StreamableAggregate implements Streamable<Object> { }

And a repository method

interface StreamableAggregateRepository extends Repository<StreamableAggregate, Object> {

  StreamableAggregate findBy();
}

the findBy() method will be considered a collection query as QueryMethod.isCollectionQuery() unwraps all types implementing Streamable directly. We need to put guards in place that particularly rule out types assignable to the root domain type.

@odrotbohm odrotbohm added type: bug A general bug in: repository Repositories abstraction labels Jun 30, 2023
@odrotbohm odrotbohm self-assigned this Jun 30, 2023
@odrotbohm odrotbohm added this to the 2.7.14 (2021.2.14) milestone Jun 30, 2023
odrotbohm added a commit that referenced this issue Jun 30, 2023
… Streamable.

We now short-circuit the QueryMethod.isCollectionQuery() algorithm in case we find the concrete domain type or any subclass of it.

Fixes #2869.
odrotbohm added a commit that referenced this issue Jun 30, 2023
… Streamable.

We now short-circuit the QueryMethod.isCollectionQuery() algorithm in case we find the concrete domain type or any subclass of it.

Fixes #2869.
odrotbohm added a commit that referenced this issue Jun 30, 2023
… Streamable.

We now short-circuit the QueryMethod.isCollectionQuery() algorithm in case we find the concrete domain type or any subclass of it.

Fixes #2869.
odrotbohm added a commit that referenced this issue Jun 30, 2023
… Streamable.

We now short-circuit the QueryMethod.isCollectionQuery() algorithm in case we find the concrete domain type or any subclass of it.

Fixes #2869.
mp911de added a commit that referenced this issue Jul 3, 2023
Fix backport to be Java 1.8 compatible.

See #2869
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: repository Repositories abstraction type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant