Echo1018
Echo1018
2015-04-21 08:43

hql 根据id字符串 查找对象对象

  • hql
  • hibernate

hql = FROM Member T where 1=1 AND T.usid in ( SELECT REGEXP_SUBSTR('424,640,790', '[^,]+', 1, LEVEL, 'i') AS STR FROM DUAL CONNECT BY LEVEL <= LENGTH('424,640,790') - LENGTH(REGEXP_REPLACE('424,640,790', ',', '')) + 1);

List results = this.getHibernateTemplate().find(hql);

报错:
org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: BY near line 1, column 119

在线等,非常感激

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答