Using JPA with other providers java.util.Date will not provide support to store milliseconds, this can usually be overcome using (see here http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Timestamp.html)
@Id
@Column(name = "STMP")
@Temporal(TemporalType.TIMESTAMP)
private Timestamp timestamp;
However with ObjectDB the milliseconds are not being stored, as shown this is an ID field and I am encountering duplicate ID errors trying to create multiple entries in the same second.
How can I modify my declaration to include milliseconds ?
I am not particularly attached to using java.sql.Timestamp, but I would like to use a single Date/Time field (ie, not milliseconds since the Epoch)