Can not query time portion of data time field in JBoss EAP
Issue
We have a data type which is stored in the database as a datetime.
That field is mapped as follows:
@Temporal(TemporalType.TIME)
java.util.Date getDepartureTime() { ... }
When this field is displayed it performs as expected and the date is not what is contained in the database, but the correct time with a date of 01/018/1970.
The problem I am encountering is I need to query the object based on time alone. For instance how many objects have a departureDate between 7:00 and 10:00 irrelevant of date.
Can a temporal field with a type of time be used to query based on time alone? If not how may this be accomplished?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.