首页 > 代码库 > association 的使用
association 的使用
<resultMap id="wmsTaskMap" type="WmsTask"> <id column="ID" jdbcType="DECIMAL" property="id" /> <result column="TYPE" jdbcType="VARCHAR" property="type" /> <result column="INVENTORY_STATUS" jdbcType="VARCHAR" property="inventoryStatus" /> <result column="SRC_INVENTORY_ID" jdbcType="DECIMAL" property="srcInventoryId" /> <result column="SRC_LOCATION_ID" jdbcType="DECIMAL" property="srcLocationId" /> <result column="SRC_LOCATION_CODE" jdbcType="VARCHAR" property="srcLocationCode" /> <result column="DEST_INVENTORY_ID" jdbcType="DECIMAL" property="destInventoryId" /> <result column="DEST_LOCATION_ID" jdbcType="DECIMAL" property="destLocationId" /> <result column="DEST_LOCATION_CODE" jdbcType="VARCHAR" property="destLocationCode" /> <result column="PLAN_QUANTITY_BU" jdbcType="DECIMAL" property="planQuantityBU" /> <result column="MOVED_QUANTITY_BU" jdbcType="DECIMAL" property="movedQuantityBU" /> <result column="STATUS" jdbcType="VARCHAR" property="status" /> <result property="info.creatorId" column="CREATOR_ID" /> <result property="info.creator" column="CREATOR" /> <result property="info.createdTime" column="CREATED_TIME" /> <result property="info.lastOperatorId" column="LAST_OPERATOR_ID" /> <result property="info.lastOperator" column="LAST_OPERATOR" /> <result property="info.lastOperatedTime" column="LAST_OPERATED_TIME" /> <association property="worker" column="WORKER_ID" javaType="User"> <id column="ID" jdbcType="DECIMAL" property="id" /> </association> <association property="productKey" column="PRODUCT_KEY_ID" javaType="WmsProductKey"> <id column="ID" jdbcType="DECIMAL" property="id" /> </association> <association property="workDoc" column="WORK_DOC_ID" javaType="WmsWorkDoc"> <id column="ID" jdbcType="DECIMAL" property="id" /> <!-- 单据编号 --> <result column="CODE" jdbcType="VARCHAR" property="code" /> </association> <!-- --> <association property="moveDocDetail" column="MOVE_DOC_DETAIL_ID" javaType="WmsMoveDocDetail"> <id column="ID" jdbcType="DECIMAL" property="id" /> <association property="product" column="PRODUCT_ID" javaType="BisProduct"> <id column="ID" jdbcType="DECIMAL" property="id" /> <result column="CODE" jdbcType="VARCHAR" property="code" /> <result column="NAME" jdbcType="VARCHAR" property="name" /> </association> </association> <!-- 包装级别 --> <association property="packageLevel" column="PACKAGE_LEVEL_ID" javaType="BisPackageLevel" select="com.jshuabo.logistics.server.dao.bis.product.IBisPackageLevelMapper.load" /> </resultMap>
为什么 association 关联不出信息, 只有Id:
<association property="moveDocDetail" column="MOVE_DOC_DETAIL_ID" javaType="WmsMoveDocDetail"> <id column="ID" jdbcType="DECIMAL" property="id" /> <association property="product" column="PRODUCT_ID" javaType="BisProduct"> <id column="ID" jdbcType="DECIMAL" property="id" /> <result column="CODE" jdbcType="VARCHAR" property="code" /> <result column="NAME" jdbcType="VARCHAR" property="name" /> </association> </association>我这样写有问题吗?
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。