title: Spring Data Repository + JPA + Date + Oracle
body: <p>I have a field lastUpdated of type java.util.Date in an Entity class. I defined methods findByLastUpdated(Date date, Pageable pageable) and findByLastUpdatedGreaterThan(Date date, Pageable pageable) in the repository interface, but they do not work correctly. Examining the logs I noticed that string comparison is used:</p>
  
  <pre><code>where table0_.LAST_UPDATED&gt;'2012-03-26 03:03:08.0'
  </code></pre>
  
  <p>The database used is Oracle, so I think a better way of doing the comparison is using the to_date function. I can perhaps do it using native query option, but that doesn't support paging. Any suggestion on how to get methods findByLastUpdated and findByLastUpdatedGreaterThan work correctly?</p>