title: ZonedDateTime with Oracle
body: <p>I'm trying to persist ZonedDateTime to Oracle. Following is my domain entity class:</p>
  
  <pre><code>@Entity
  @Table(name = "TESTTABLE")
  public class Order {
      private static final long serialVersionUID = 1L;
  
      @Type(type = "uuid-binary")
      @Column(name = "ID")
      private UUID id;
  
      @Column(name = "CREATE_DATE")
      private ZonedDateTime createdOn;
  
  ..and so on.
  </code></pre>
  
  <p>I also have a converter as follows to convert the dates:</p>
  
  <pre><code>@Converter(autoApply = true)
  public class OracleZonedDateTimeSeriliazer implements AttributeConverter&lt;ZonedDateTime,Date&gt;{
  
  
          @Override
      public Date convertToDatabaseColumn(ZonedDateTime attribute) {
          return attribute == null ? null : java.util.Date.from(attribute.withZoneSameInstant
                  (ZoneOffset.UTC).toInstant());
      }
  
      @Override
      public ZonedDateTime convertToEntityAttribute(Date dbData) {
          return dbData == null ? null : ZonedDateTime.ofInstant(dbData.toInstant(), DateUtils.getEasternZoneId());
      }
  }
  </code></pre>
  
  <p>When i try to persist this entity I'm getting the following stacktrace:</p>
  
  <pre><code>2016-12-16 10:47:06,669 [main] ERROR o.h.e.jdbc.spi.SqlExceptionHelper - ORA-00932: inconsistent datatypes: expected DATE got BINARY
  org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement
  </code></pre>
  
  <p>If anyone could help me what i'm doing wrong, it'd be much appreciated.</p>