如何将此sql查询转换为hql

时间:2014-08-12 11:46:05

标签: java hibernate jpa

SELECT *
FROM (SELECT *,CONCAT(org_name,'|',email_id) txt
      FROM t_organization) a
WHERE txt LIKE '%o%';

如何为此编写hql

2 个答案:

答案 0 :(得分:0)

检查以下网址: (与sql到hql查询有关)

http://forums.devshed.com/java-help-9/sql-hql-589692.html

答案 1 :(得分:0)

在hibernate中通过以下链接嵌套的hql,你会理解

http://learningviacode.blogspot.in/2012/12/hql-and-nested-queries.html