[英]RxJava (+Room): Why Flowable<List<MyObject>> returns List<List<MyObject>>?
My Room query(from MyObjectDao) with Flowable<List<MyObject>>
is returning List<List<MyObject>>
when running tests. 运行测试时,带有
Flowable<List<MyObject>>
My Room查询(来自MyObjectDao)正在返回List<List<MyObject>>
。 Here is the query: 这是查询:
@Query("SELECT * FROM myobjects")
Flowable<List<MyObject>> getAllMyObjects();
Here is how I am extracting the first MyObject from the query: 这是我从查询中提取第一个MyObject的方法:
MyObject toDelete = myObjectDao.getAllMyObjects().test().values().get(0).get(0);
As you can see, I am getting a List<List<MyObject>>
from the query? 如您所见,我正在从查询中获取
List<List<MyObject>>
? Why is that? 这是为什么? Why is it getting wrapped inside another List?
为什么将它包裹在另一个列表中?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.