I'm trying to use LocalDate and LocalDateTime with Java 8 in my app. I'm using Hibernate 4.3.5 and Spring. I followed this interesting tutorial here and all works but I've a problem when I use DATE() construct.
When I try to do:
SELECT * FROM TABLE 
WHERE DATE(data)=DATE(:data)
I get an IllegalArgumentException because setParameter is expecting java.util.Date instead of java.time.LocalDate, if I don't use DATE() construction it is expecting java.time.LocalDateTime, I already implemented hibernate converters but I can't find a good solution for it (converting from LocalDate to java.util.Date doesn't look for me good), anyone knows how fix this problem?
 
    