Hi There.
Assume I have object which represents TASK. Task have due date.
How do I create query to get all tasks which are due today?
Some working code like
"select t from Task t where dueDate=:today"
will be usefull.
Thank you in advance.
Hi There.
Assume I have object which represents TASK. Task have due date.
How do I create query to get all tasks which are due today?
Some working code like
"select t from Task t where dueDate=:today"
will be usefull.
Thank you in advance.
Assuming your dueDate
is a Date
annotated like this:
@Temporal(TemporalType.DATE)
private Date dueDate;
Then you can do the following query in JPQL:
select t from Task where t.dueDate = current_date
You assume that @Temporal is supported by Google's GAE/J plugin. It isn't, despite being reported to them over a year ago http://code.google.com/p/datanucleus-appengine/issues/detail?id=20&colspec=ID%20Stars%20Type%20Status%20Priority%20FoundIn%20TargetRelease%20Owner%20Summary
Any one who want this feature, should vote for this issue Here http://code.google.com/p/datanucleus-appengine/issues/detail?id=20