Java 获得;空";尝试访问mybatis mapper xml中的对象变量时 在输入getEventsByTypeAndProductEvaluation之前,请确保有用于evaluation和eventType的toString方法,并在此处显示它们。
获得;空";尝试访问mybatis mapper xml中的对象变量时Java 获得;空";尝试访问mybatis mapper xml中的对象变量时 在输入getEventsByTypeAndProductEvaluation之前,请确保有用于evaluation和eventType的toString方法,并在此处显示它们。,java,xml,orm,mybatis,ibatis,Java,Xml,Orm,Mybatis,Ibatis,获得;空";尝试访问mybatis mapper xml中的对象变量时 在输入getEventsByTypeAndProductEvaluation之前,请确保有用于evaluation和eventType的toString方法,并在此处显示它们。是否已验证调用接口方法getEventsByTypeAndProductEvaluation()时没有传入null参数?您的对象可能不是空的,但ID是空的!!! public interface RawProductEvaluationEven
在输入getEventsByTypeAndProductEvaluation之前,请确保有用于evaluation和eventType的toString方法,并在此处显示它们。是否已验证调用接口方法getEventsByTypeAndProductEvaluation()时没有传入null参数?您的对象可能不是空的,但ID是空的!!!
public interface RawProductEvaluationEventDao
{
public List<ProductEvaluationEvent> getEventsByTypeAndProductEvaluation(
@Param("evaluation") ProductEvaluation evaluation,
@Param("eventType") EventType eventType);
}
<select id="getEventsByTypeAndProductEvaluation" resultType="ProductEvaluationEvent">
SELECT
id,
productEvaluationFk,
eventTimestamp,
receiptEventTypeFk,
isStartEvent,
isSuccess,
supplementalEventText,
exceptionStackTraceText
FROM
productEvaluationEvent
WHERE productEvaluationFk = #{evaluation.id}
AND receiptEventTypeFk = #{eventType.id}
</select>
14:47:39 DEBUG c.r.w.p.d.r.R.getEventsByTypeAndProductEvaluation - ==> Preparing: SELECT id, productEvaluationFk, eventTimestamp, receiptEventTypeFk, isStartEvent, isSuccess, supplementalEventText, exceptionStackTraceText FROM productEvaluationEvent WHERE productEvaluationFk = ? AND receiptEventTypeFk = ?
14:47:39 DEBUG c.r.w.p.d.r.R.getEventsByTypeAndProductEvaluation - ==> Parameters: null, null