Skip to content

Kotlin Flow as return type for repository methods causes an exception #2386

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
sothawo opened this issue Dec 3, 2022 · 0 comments · Fixed by #2387
Closed

Kotlin Flow as return type for repository methods causes an exception #2386

sothawo opened this issue Dec 3, 2022 · 0 comments · Fixed by #2387
Assignees
Labels
type: bug A general bug

Comments

@sothawo
Copy link
Collaborator

sothawo commented Dec 3, 2022

When defining a repository method to be used in a Kotlin coroutine context like

fun searchByYear(year: Int): Flow<SeachHit<T>>

a call to this method fails as the found document is being mapped into the SearchHit instead of the entity type to be put into the SearchHit.

@sothawo sothawo added the type: bug A general bug label Dec 3, 2022
@sothawo sothawo added this to the 5.1 M1 (2022.1.0) milestone Dec 3, 2022
@sothawo sothawo self-assigned this Dec 3, 2022
sothawo added a commit that referenced this issue Dec 3, 2022
sothawo added a commit that referenced this issue Dec 3, 2022
Original Pull Request #2387
Closes #2386

(cherry picked from commit 1fa6c9f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
1 participant