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

fetchExists is returning empty Mono instead of Mono containing false #32

Open
GeorgiPetkov opened this issue May 7, 2021 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@GeorgiPetkov
Copy link

GeorgiPetkov commented May 7, 2021

When a query yields records then fetchExists behaves as expected (returns Mono containing true).
However, when there are no records fetchExists returns an empty Mono instead of Mono containing false.

In particular the code return fetchOne(existsQuery).map(Objects::nonNull) should be changed to return fetchOne(existsQuery).hasElement(). A Mono's element is never null so .map(Objects::nonNull) either does nothing (for empty Mono) or maps to true.

@gofabian
Copy link
Owner

gofabian commented May 9, 2021

Thanks for your report. We should fix this misbehaviour with your proposed change.

@gofabian gofabian added bug Something isn't working good first issue Good for newcomers labels May 9, 2021
@gofabian gofabian added this to the 0.3.1 milestone May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants