开发者

Date literals in Hibernate

开发者 https://www.devze.com 2023-04-11 17:09 出处:网络
I wonder how to use date literals in Hibernate query language. I did as follows in my JPA project (as Eclipselink the provider) and it works.

I wonder how to use date literals in Hibernate query language. I did as follows in my JPA project (as Eclipselink the provider) and it works.

SELECT m FROM Me m WHERE m.dob <= {d '1984-10-06'}

But th开发者_C百科is does not work when I change Hibernate (V 3.6.7) as the provider for my JPA project.


The reference documentation says:

Expressions used in the where clause include the following:
[...]

  • SQL literals 'foo', 69, 6.66E+2, '1970-01-01 10:00:01.0'
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号