Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-3503

Add dedicated default value bridges for java.sql.Timestamp, java.sql.Date and java.sql.Time

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0.0.Alpha3
    • Component/s: mapper-pojo
    • Labels:
      None

      Description

      From the javadoc of Timestamp:

       * Due to the differences between the <code>Timestamp</code> class
       * and the <code>java.util.Date</code>
       * class mentioned above, it is recommended that code not view
       * <code>Timestamp</code> values generically as an instance of
       * <code>java.util.Date</code>.  The
       * inheritance relationship between <code>Timestamp</code>
       * and <code>java.util.Date</code> really
       * denotes implementation inheritance, and not type inheritance.
      

      Complying applications will use Time and Timestamp in their entities instead of java.util.Date, so we'd better support that.

      Also, judging from the presence of a java.sql.Timestamp#toLocalDateTime method, a java.sql.Date#toLocalDateTime method and a java.sql.Time#toLocalTime method, these classes should be converted to a LocalDateTime, LocalDateTime and LocalTime, respectively. So just using the same bridge as java.util.Date will not work.

        Attachments

          Activity

            People

            • Assignee:
              fercoli Fabio Massimo Ercoli
              Reporter:
              yrodiere Yoann Rodière
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: