【发布时间】:2016-09-11 18:34:05
【问题描述】:
在执行异常时,我在 Spring Repository 中有以下方法是“具有该位置 [2] 的参数不存在”。我尝试了不同的选项来转义单引号('),希望问题仅在于这个。请提出建议。
@Query(value="select cus_acc_grp_i,"
+ " xmlquery ('$APP_CMP_WRK_XML/Root/CCPABusRuleAscList/CCPABusRuleAsc[position() >= (?2) and not(position() > (?3)) ]')"
+ " from ADM_APP_CMP_WRK where CUS_ACC_GRP_I = (?1)", nativeQuery=true)
AdministrationApplicationCompletion findCurrentPageRulesByClient(@Param("clientId") Integer customerAccountGroupId,
@Param("startIndex") Integer startIndex,
@Param("endIndex") Integer endIndex);
【问题讨论】:
-
我对 DB2 下的 XQuery 没有太多经验,但您似乎指的是第二个和第三个参数中的两个,而只注册了其中两个。
标签: sql spring db2 xquery spring-data-jpa