Application scenario:Each mybaits result is mapped to an entity class. Sometimes when I am making front-end reports, I can directly get the desired report through SQL statements, but the results are all required. Map to an entity class. If individual fields in multiple reports are different, I need to create an entity class for each report (an unnecessary operation), and if a report needs to be modified Field, I also need to modify the corresponding entity class.
Question: Can I directly obtain a result similar to a two-dimensional array? I will directly use my sql query results.
PS: TriedresultType="java.util.List"
limited the return result to List
and returned the following error:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.UnsupportedOperationException
phpcn_u15822017-05-17 10:03:04
<resultMap id="FooResultMap" type="com.package.StringFoo">
<result property="name" column="name"/>
<collection property="foo" resultMap="FooMapORJavaType"/>
</resultMap>
<select id="findFoo" resultMap="FooResultMap"></select>
Hope this can help you
Reposted from
http://stackoverflow.com/ques...