Q:

Spring JPA repositories & JSR310 & native queries

It appears that the JSR310 Type Instant is bound as VARBINARY in native queries:
@Query(value = "select * from state_entry where timestamp > ?1 and deleted = false limit 10", nativeQuery = true)

log output:
2015-01-29 15:41:26.685 TRACE 12250 --- [  XNIO-1 task-1] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [VARBINARY] - [2015-01-26T13:24:07Z]

The equivalent JPA query works without issues:
@Query("FROM StateEntry where timestamp > ?1")

log output:
2015-01-29 15:50:37.228 TRACE 12791 --- [  XNIO-1 task-2] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [TIMESTAMP] - [2015-01-26T13:24:07Z]
2015-01-29 15:50:37.228 TRACE 12791 --- [  XNIO-1 task-2] o.h.type.descriptor.sql.BasicBinder      : binding parameter [1] as [TIMESTAMP] - [2015-01-26 14:24:07.0]

Is there a workaround or do I have to use java.util.Date in native queries?
I am using spring-data-jpa 1.8.0 M1 btw.

A:

Apparently it works as designed (JPA spec).
https://jira.spring.io/browse/DATAJPA-671

