2 Replies Latest reply on Jan 23, 2008 5:28 AM by Thomas Hamacher

    Using joda time in entites

    Thomas Hamacher Novice

      Hi @all,

      does anyone know, if there is a chance to use the joda time library as the default date-implementation with ejb3?

      I´m currently facing the following problem. I would like to use the DateTime objects of the joda library within my entities instead of using the plain, old and buggy java.util.Date implementation. If I simply replace the object-types all DateTime-objects are stored in the database as VarBinary. But I would like to use them as a timestamp or date sql-type.

      I saw, that there is a subproject from joda, that uses the @Type annotation from hibernate to convert them to different SQL-Types. But until now I´m absolutely independent from any persistence-framework, because I simply rely on the javax.persistence-standard, so I would not prefer to mix it now with any hibernate-specific annotations.

      But maybe there is something similiar, so I can use it anyway.

      Does anyone know of a good solution to this problem?

      Thanks for your answers