2014-06-18 26 views

回答

0

这样的SQL超出HQL的范围,但可以使用createNativeQuery()已经休眠执行任意SQL:

SomeClass o = em.createNativeQuery("select * from SomeClassTable where some_proc(someProperty) > 5", SomeClass.class); 

关于本机查询更多信息,请参阅the documentation

+0

非常感谢,这就是要去尝试。 –