Khi dùng pagination thì việc trả về đúng thứ tự id là quan trọng. Trong hàm entityToModels
, mặc dù entities
đúng thứ tự, nhưng kết quả trả về của blockingGetList
sẽ sai thứ tự. Vấn đề này nên xử lý sao ạ?
private List entityToModels(List entities) { return Reactive.multiple() .registers(entities, releasedProjectService::entityToModel) .blockingGetList(); }
Chỗ này nếu thực sự muốn trả về list theo thứ tự sẽ cần sửa lớp reactive, Anh nghĩ em có thể sort theo điều kiện nào đó xem sao.
Anh bổ sung hàm
Single.blockingGetList
em ạ