I have a one to many relation of two entities. Is there a way to paginate ROOM database response using jetpacks Paging 3 library. Dao's return type would be PagingSource<Int, List<TaskWithAttachmets>>
data class TaskWithAttachmets(
@Embedded
val task: LocalTask,
@Relation(
parentColumn = "taskId",
entityColumn = "taskId"
)
val attachments: List<LocalAttachmentsInfo>,
)
I'm getting following error at compile time
error: Not sure how to convert a Cursor to this method's return type (androidx.paging.PagingSource<java.lang.Integer, java.util.List<com.sample.database.entities.TaskWithAttachmets>>)