How to persist an entity which contains a field of user type using JPA2

Posted by Marcin Bialon on Stack Overflow See other posts from Stack Overflow or by Marcin Bialon
Published on 2010-03-22T12:29:23Z Indexed on 2010/03/22 12:31 UTC
Read the original article Hit count: 502

Filed under:
|
|

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;
}

© Stack Overflow or respective owner

Related posts about jpa

Related posts about jpa2