码迷,mamicode.com
首页 > 其他好文 > 详细

association 的使用

时间:2014-08-06 23:11:02      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:mybatis   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>
我这样写有问题吗?

association 的使用,布布扣,bubuko.com

association 的使用

标签:mybatis   association   

原文地址:http://blog.csdn.net/dayan1852/article/details/38405959

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!