使用ibatis获取数据列表的问题

时间:2012-10-08 14:48:05

标签: java sql oracle list ibatis

我讨论ibatis中的映射问题。返回的列表大小为3,但数据显示为空,因为数据库中包含数据。

List<RecordData> recordDataList = recordMapper.getQuestionDataParams(
                personId, surveyId, questionIds);
        System.out.println("rcord size" + recordDataList.size());
        System.out.println("rcord size" + recordDataList);

此处大小为3,但数据为空。

<mapper namespace="com.workers.surveytoexcel.dao.IRecordMapper">    

        <resultMap id="surveyMap" type="com.workers.surveytoexcel.dom.RecordData" >
               <result property="QUES_ID" column="quesId" />
        </resultMap>


    <select id="getQuestionDataParams" parameterType="map" resultMap="surveyMap">
          select ques_id from t_survey_other_ans where doc_id=3294628 and ques_id=3743245       
    </select>


public class RecordData {
    private long quesId;
/**
     * @return the quesId
     */
    public long getQuesId() {
        return quesId;
    }

    /**
     * @param quesId
     *            the quesId to set
     */
    public void setQuesId(long quesId) {
        this.quesId = quesId;
    }
}

这里有什么问题?

0 个答案:

没有答案