Skip to content

Add support for support distinct derived query methods #344

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

Closed
m1ngyuan opened this issue Apr 8, 2020 · 1 comment
Closed

Add support for support distinct derived query methods #344

m1ngyuan opened this issue Apr 8, 2020 · 1 comment
Labels
type: enhancement A general enhancement

Comments

@m1ngyuan
Copy link
Contributor

m1ngyuan commented Apr 8, 2020

If the code is available, I will create a PR for it

@m1ngyuan
Copy link
Contributor Author

m1ngyuan commented Apr 9, 2020

A PR has been created for this issue #346

@mp911de mp911de linked a pull request Apr 21, 2020 that will close this issue
mp911de pushed a commit that referenced this issue Apr 21, 2020
We now support distinct derived queries that are useful with projections to retrieve distinct results.

interface UserRepository extends Repository<User, Long> {

  Mono<UserProjection> findDistinctByFirstName(String firstName);

}

interface UserProjection {

  String getFirstName();

}

Original pull request: #346.
mp911de added a commit that referenced this issue Apr 21, 2020
Consider projection properties as SELECT projection. Refactor distinct() into marker method without accepting a boolean flag. Make distinct field final. Update tests.

Original pull request: #346.
@mp911de mp911de added this to the 1.1 RC2 (Neumann) milestone Apr 21, 2020
@mp911de mp911de added the type: enhancement A general enhancement label Apr 21, 2020
@mp911de mp911de closed this as completed Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants