Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phuongtailtranminh/22bb5325056dd6c3d10eb04ce539a273 to your computer and use it in GitHub Desktop.
Save phuongtailtranminh/22bb5325056dd6c3d10eb04ce539a273 to your computer and use it in GitHub Desktop.
Hibernate JodaDatetime and Jadira Type
@Basic
@Column(name = "created_date", nullable = true)
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime")
public DateTime getCreatedDate() {
return createdDate;
}
public void setCreatedDate(DateTime createdDate) {
this.createdDate = createdDate;
}
@Basic
@Column(name = "updated_date", nullable = true)
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime")
public DateTime getUpdatedDate() {
return updatedDate;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment