Issue
Hi i am trying to map my data class to jdbcTemplate result set . Its mapping all the columns which are matching with the result set but if its different its not mapping . Do we have any annotation to map such columns ? Funding class is not Entity class.
@Data
public class Funding {
private Long loanId; // DataBase Column name is LOAN_ID - This is mapping correctly
private String sellerLoanId;// Database Column name is L_SELLER_LOAN_ID - This is not
// mapping.
}
mapper = BeanPropertyRowMapper.newInstance(Funding.class);
List<Funding> fundingValues = this.jdbcTemplate.query(sql,mapper);
I tried with annotations like
@Column(name = "L_SELLER_LOAN_ID")
Solution
You have to implement your own Mapper.
See the example on springjdbc_rowmapper
Answered By - Manuel Romeiro
Answer Checked By - Pedro (JavaFixing Volunteer)