ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Angso, Tony" <Tony_An...@medco.com>
Subject RE: Need Help in iBatis Configuration
Date Mon, 10 Mar 2008 13:44:30 GMT

When using the SQLMap and Java code below, am getting an empty result,
(I mean not null).  The parameter values are correct and when queried
directly, it return 1 row. However doing it through iBatis, return an
empty but initialized rxBean...

Any help is much appreciated.


My SQLMap is
	<parameterMap id="rxlocParam" class="map">
		<parameter property="rx" jdbcType="VARCHAR"
javaType="java.lang.String"/>
		<parameter property="loc" jdbcType="VARCHAR"
javaType="java.lang.String"/>
	</parameterMap>
	<resultMap id="ImRxBean"
class="com.medco.imaging.app.alpha.ImRxBean">
		<result property="docId" column="F_DOCNUMBER_ID"/>
		<result property="tiffDocId" column="TIFF_DOC_ID"/>
		<result property="docCommittalDate"
column="DOC_COMMITTAL_DTE"/>
		<result property="libraryName" column="F_LIBRARY_NAME"/>
		<result property="rx" column="RXNUM_TXT"/>
		<result property="loc" column="LOCATION_CDE"/>
		<result property="deleteDate" column="F_DELETE_DTE"/>
	</resultMap>
	<select id="getEISPolyScript" parameterMap="rxlocParam"
resultMap="ImRxBean" >
		SELECT F_DOCNUMBER_ID, 
			TIFF_DOC_ID, 
			DOC_COMMITTAL_DTE, 
			F_LIBRARY_NAME,
			RXNUM_TXT,
			LOCATION_CDE,
			F_DELETE_DTE
		FROM IM_RX rx, IM_FILENET_LIBRARY lib
		WHERE rx.F_LIBRARY_ID = lib.F_LIBRARY_ID 
		   AND RXNUM_TXT =   ?
		   AND LOCATION_CDE = ?
	</select>

My Java Code is

		Map map = new HashMap();
		map.put("rx", "0101402722");
		map.put("loc","03");

ImRxBean rxBean = (ImRxBean) sqlMap.queryForObject("getEISPolyScript",
map);

rxBean.getDocId returns zero??? Did it find any record?, if it did why
zero?

Thanks

Tony

-----------------------------------------
This e-mail message and any attachments contain confidential
information from Medco. If you are not the intended recipient, you
are hereby notified that disclosure, printing, copying,
distribution, or the taking of any action in reliance on the
contents of this electronic information is strictly prohibited. If
you have received this e-mail message in error, please immediately
notify the sender by reply message and then delete the electronic
message and any attachments.

Mime
View raw message