I keep getting this error
INFO: org.springframework.orm.hibernate.HibernateQueryException: undefined alias: fileN [SELECT fileN,workItemTyC,workItemSbtyC,accN,usTaxIdN,orgId,orgNm,creD,lstEvtD,archD,workDesc,nysePrblC,nysePrdC,fstNm,lstNm,xmlXSz,tsfString FROM com.fmr.xtrac.hibernate.TTkawArchWorkItem WHERE orgId = ? AND workItemSbtyC = 'DUSA']; nested exception is net.sf.hibernate.QueryException: undefined alias: fileN [SELECT fileN,workItemTyC,workItemSbtyC,accN,usTaxIdN,orgId,orgNm,creD,lstEvtD,archD,workDesc,nysePrblC,nysePrdC,fstNm,lstNm,xmlXSz,tsfString FROM com.fmr.xtrac.hibernate.TTkawArchWorkItem WHERE orgId = ? AND workItemSbtyC = 'DUSA']
Here is the code I am using
List WorkItemSearchResultList =
_hibernateTemplate.find(
"SELECT fileN,"
+ "workItemTyC,"
+ "workItemSbtyC,"
+ "accN,"
+ "usTaxIdN,"
+ "orgId,"
+ "orgNm,"
+ "creD,"
+ "lstEvtD,"
+ "archD,"
+ "workDesc,"
+ "nysePrblC,"
+ "nysePrdC,"
+ "fstNm,"
+ "lstNm,"
+ "xmlXSz,"
+ "tsfString"
+ " FROM com.fmr.xtrac.hibernate.TTkawArchWorkItem "
+ "WHERE orgId = ?" + createSearchWhereClause(srchCriteria),
new Object[] {new BigDecimal(cookie.getOrgId())},
new Type[] {Hibernate.BIG_DECIMAL });
|