我正试图从下表中获取clientVenderId
。
`MAPPED_CLIENTVENDOR_ID DATE CLIENT_VENDOR_ID EMP_ID
'448186 2012-12-19 408239 12
'448186 2012-12-19 337186 12
'448186 2012-12-19 401554 12
'448186 2012-12-19 359885 12`
这是使用DetachedCriteria
public List<DuplicateClientMapping> getDuplicateRecordsById(Long contactId) throws BusinessException {
DetachedCriteria detachedCriteria =
DetachedCriteria.forClass(DuplicateClientMapping.class);
if (null != contactId && contactId != 0) {
detachedCriteria.add(Restrictions.eq("mappingClientId", contactId));
}
List<DuplicateClientMapping> list = (List<DuplicateClientMapping>) hibernateTemplate.findByCriteria(detachedCriteria);
return list;
}
仅返回第一行记录四次的结果。因此,我该如何获取所有clientVender
ID。