Search code examples
springmappingfieldibatis

is it possible for custom field mapping using ibatis 2.3? e.g. FACTOR_INFO001..FACTOR_INFO200 map to List<String>


I need a custom mapping using ibatis-sqlmap 2.3.4.726 and spring 2.5.6.SEC01.

class:

public class Rosen {
    private String id;
    private List<String> factor_info;
}

sql:

select ID, FACTOR_INFO001, FACTOR_INFO002, ..., FACTOR_INFO200
from FACTOR_INFO;

I need to map the FACTOR_INFO* fields to a List<String>. My findings are 1) if I were able to extends/inject RowHandlerCallback then override handleResultObject, it seems possible. 2) if there is something configuration inside the sqlmap xml file.

anybody can guide me or give some hints on how to address it?

thanks


Solution

  • There is an another discussion to answer this question. Please refer to -> mybatis user discussion