我在一次海底应用中尝试了红利,并遇到了一个问题:
我在物体上设立了外国藏书,并指定了某些物体。 我可以使用所有问题。 农林局调查这些物体的方法,并按预期归还:
allTeams = getHelper().getTeamDao().queryForAll();
for(ScrumTeam team : allTeams) {
if(team.getMembers() == null || team.getMembers().size() == 0) {
log("No Members");
} else {
log(team.getMembers().size()+" Members");
}
}
这项工作按预期进行,在小组中印刷“2名成员”或“3名成员”,这是正确的数据。
显然,我要对数据进行分类,我发现的这样做的方法是使用查询系统:
allTeams = getHelper().getTeamDao().queryBuilder().selectColumns("id", "name").orderBy("name", true).query();
for(ScrumTeam team : allTeams) {
if(team.getMembers() == null || team.getMembers().size() == 0) {
log("No Members");
} else {
log(team.getMembers().size()+" Members");
}
}
The above code outputs "No members", but i can access other data of the team (id and name) perfectly. I tried setting eager to true and false on the collection, but neither worked. Investigating further, I found out, that the members array is not initialized (null). Is this a bug, or am I using the Library incorrectly? Is there a way to fetch the ForeigCollection manually?
感谢你们的答复!