Mapper部分联合查询问题

存在联合查询时,查询语句正常写在</resultMap>前需要加入联合查询

<association property="rminemscore" javaType="org.kingc.NationalBureauExpertEvaluatioSystem.model.EvaluationResults"> <result property="rminemscore" column="rminemscore" jdbcType="FLOAT"/> </association>

其中javaType后需要加入要添加的表的路径。

<mapper namespace="org.kingc.NationalBureauExpertEvaluatioSystem.dao.EnterPriseInfoDaoB"> <resultMap id="BaseResultMap2" type="org.kingc.NationalBureauExpertEvaluatioSystem.model.EnterPriseInfoB">

namespace是需要映射到的DAO层名,resultMap type是表名。

在Model需要在重新添加那个字段。

经验分享 程序员 微信小程序 职场和发展