Saturday, January 22, 2011

JPA query date setParameter

I have an entity which has Date field as one of the column. I have a
query to extract the entites which match the date that I send in as
parameter,

Query:
select o from Assignment o where o.assignmentDueDate = :date

(Setting parameter)
assignmentsDueForDay.setParameter("date", new Date(),
TemporalType.DATE);

BUT this doesnt yeild me any results, I confirmed the table has lot of
entities for the date I am trying to extract.

Please help.

-Gana

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate