@Qury查询后返回的结果集怎么转为List<实体对象>,而不是List<Object>
miluxi opened this issue · 0 comments
miluxi commented
请教一下,在Repository中自定义一个方法通过外键查询,返回的结果集是Object数组,怎么转实体对象?
@query("select rpItem.rfiKey,rpItem.rfiName,rpItem.rfiDescription,rpItem.rfiMaxLength , " +
" rpItem.rfiClass,rpItem.rfiDataClass,rpItem.rfiActive,rpItem.reportformByRfKey" +
" from ReportforminitemEntity rpItem where rpItem.reportformByRfKey.rfKey=:rfKey " +
" order by rpItem.rfiKey desc ")
List findByRfKey(@param("rfKey") String rfKey);