I'm trying to retrieve a list of Maps for a given query using JDBCTemplate. The following method seems to be apt for my use case:
public List<Map<String,Object>> queryForList(String sql)
throws DataAccessException
However, I want to make sure that for a given row, the Map's order is guaranteed. i.e, A LinkedHashMap would be better as I want to preserve the order of columns. Is there a better way to achieve this using JDBCTemplate?