我有两个实体与一对多关系相连,我想得到整个元素列表。
我试过:
int count = showcase.notices.size();
List<Notice> notList = showcase.notices.subList(0, count);
这个
sublist
定义为
sublist(int start, int end)
其中
end
不在列表中。
有没有更直接的方法来获取整个列表?
有点像
List<Notice> notList = showcase.notices.getList();