Posty

Wyświetlam posty z etykietą Templates

Spring: wyciaganie danych JDBCTamplates - naprawa

Ciekawe, jak to jest, że wystarczą 3,5 miesiąca i już nie bardzo pamiętam o co w tym chodziło, ale jeszcze coś mi świta. A może jakiś szanowny czytelnik rozkoduje? https://stackoverflow.com/ questions/56999289/spring- jdbc-template-cant-infer-the- sql-type-to-use-for-an- instance I think You should make 2 things:  1. Give :param in SQL  2. Select proper object into queryForList Example:     protected static List<Map<String, Object>> getFolderListIds(Long documentId) {         String sql = "SELECT id FROM table WHERE id = :document_id"         MapSqlParameterSource parameters = new MapSqlParameterSource();         parameters.addValue("document_ id", documentId);         NamedParameterJdbcTemplate namedParameterJdbcTemplate = new NamedParameterJdbcTemplate( Something.getDataSource());    ...