I Want to get a week value

Posted by satya on Stack Overflow See other posts from Stack Overflow or by satya
Published on 2009-11-09T06:26:36Z Indexed on 2010/04/30 19:47 UTC
Read the original article Hit count: 320

Filed under:
|
|
|

I wan to get the value of only one week. I am using the following JPA query:

 SELECT a 
 FROM questions.dao.hibernate.Questions a 
 WHERE (a.posted_date-CURRENT_DATE)>= 7

But I am getting an error message like

org.hibernate.QueryException: could not resolve property: posted_date of: questions.dao.hibernate.Questions [SELECT a FROM questions.dao.hibernate.Questions a WHERE (a.posted_date-CURRENT_DATE)>=7]

Please help me.

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate