How to persist an entity which contains a field of user type using JPA2
- by Marcin Bialon
I'm looking for a way to persist an entity which contains a field of a user type.
In this particular example I would like to persist the ts field as number of milliseconds.
import org.joda.time.DateTime;
@Entity
public class Foo {
@Id
private Long id;
private DateTime ts;
}