今天我使用了mybatis进行操作查询,执行了主查询应该会按道理发生子查询的!
<association property="orderListInfoMap" column="res_id" select="getCount" javaType="java.util.Map"></association>
<collection property="newsList" select="selectnewsList" column="res_id" javaType="java.util.List"/>
但是这这个在log4j死活不执行!
于是我用MySQL直接执行主查询,发现了结果中res_id是空的!!!!!
所以mybatis根本就不会去继续把空的东西映射到 子查询collection和association中,不会继续查询啦!