Sto migrando a Hibernate 5.0.3.Final da 3. In 3.x Sto usando joda-time per persistere LocalDateTime nel DB oracle. Ora vedo che Hibernate 5 non ha supporto per joda-time. Per favore fatemi sapere quale sarebbe l'alternativa migliore per questo?Migrazione in Hibernate 5 da 3
Ecco un esempio di codice.
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.LocalDateTime;
public class ComponentHistory {
@Column(name = EntityConstants.CREATED_BY_COLUMN_NAME)
private String createdBy;
@Column(name = EntityConstants.CREATED_DATE_COLUMN_NAME)
@Type(type = "org.joda.time.contrib.hibernate.PersistentLocalDateTime")
private LocalDateTime createdDate;
@Column(name = EntityConstants.UPDATED_BY_COLUMN_NAME)
private String updatedBy;
@Column(name = EntityConstants.UPDATED_DATE_COLUMN_NAME)
@Type(type = "org.joda.time.contrib.hibernate.PersistentLocalDateTime")
private LocalDateTime updatedDate;
http://www.bartkummel.net/2015/04/migrating-jodatime-to-java-time/ –