0
以下查询在mysql查询浏览器中正常工作,但是当我将它移动到jpql或本机查询并尝试使用实体管理器执行时没有得到任何结果也没有看到任何结果错误也是。hql/jpql与jpa休眠不工作的COS和辐射功能
我使用Hibernate的核心3.3.0实体管理器3.4.0与春天国际奥委会EntityManager的注射
select * from location
where 1=1
and latitude is not null and longitude is not null
and (6371 *
acos( cos(radians(12.922253)) *
cos(radians(latitude)) *
cos(radians(77.614417) - radians(longitude))
+ sin(radians(12.922253)) *
sin(radians(latitude))
)) < 100.0
其实际上“和”只有并没有&&纠正了描述 – Mahendra 2012-04-22 08:04:13