Avoid having a huge collection of ids by calling a DAO.getAll()
- by Michael Bavin
Instead of returning a List<Long> of ids when calling PersonDao.getAll() we wanted not to have an entire collection of ids in memory.
Seems like returning a org.springframework.jdbc.support.rowset.SqlRowSet and iterate over this rowset would not hold every object in memory.
The only problem here is i cannot cast this row to my entity.
Is there a better way for this?