title: How to use joda time with JPA (eclipselink)?
body: <p>I tried to use the <code>DataTime</code> in my <code>entity</code> class. Adding <code>@Temporal(TemporalType.DATE)</code> above the field, I got the error saying <strong>"The persistent field or property for a Temporal type must be of type java.util.Date, java.util.Calendar or java.util.GregorianCalendar"</strong>. I can introduce the conversion back and forth; using setters and getters as follows:</p>
  
  <pre><code>@Temporal(TemporalType.DATE)
  private Calendar attendanceDate;
  
  public DateTime getAttendanceDate() {
      return new DateTime(this.attendanceDate);
  }
  
  public void setAttendanceDate(DateTime attendanceDate) {
      this.attendanceDate = attendanceDate.toCalendar(Locale.getDefault());
  }
  </code></pre>
  
  <p>but I hope <code>eclipselink</code> to do it for me. I have gone thro' <a href="https://stackoverflow.com/questions/6284098/persist-joda-times-datetime-via-jpa">Persist Joda-time&#39;s DateTime via Hibernate</a>. The answer suggesting to use hibernate, but I have to use eclipselink. I can use the <code>DateTime</code> object in my entity class with DB representation as <code>BLOB</code>, but I need it as <code>Date</code>. Is there anything like <code>jodatime-eclipselink</code>? Or any other suggestion? Thanks for the help.</p>