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需要在重新添加那個字段。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章