About Temporal

31-40 of 43Refresh
Forum
3

Possible issue with String fields

; String external_booking_ref; @Temporal(javax.persistence.TemporalType.DATE) Date start_dt; @Temporal(javax.persistence.TemporalType.DATE) Date end_dt; @Temporal(javax.persistence
Forum
3

TemporalType injection with Calendar using JPA

; private String periodType; @Temporal(TemporalType.TIMESTAMP) public Calendar getBeginTime ... ) { this.beginTime = beginTime; } @Temporal(TemporalType.TIMESTAMP) public Calendar ... with one of the supported temporal types. Ah!!!   I can see that in the small print now.    (After I wasted
Forum
2

java.sql.Timestamp.getTime() not working

class Player { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public int id; @Temporal(TemporalType.TIMESTAMP) public Timestamp loginAt; @Temporal(TemporalType.TIMESTAMP) public Timestamp
Forum
2

LifeCycle Event with Embeddable classes

= CascadeType.ALL, fetch = FetchType.EAGER) private List barList; @Temporal(TemporalType.TIMESTAMP ... Timestamp(System.currentTimeMillis()); }} @Embeddable public class Bar { @Temporal(TemporalType
Forum
2

Problem with entities detection

.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax ... ; @Column(name = "fecha_nacimiento") @Temporal(TemporalType.DATE) private Date fecha
Forum
1

_PersistenceException: Type is not found on getSingleResult.

identificacion;         private TipoIdentificacion tipo;         @Temporal(TemporalType.DATE
Forum
1

Entity with java.util.Date column gives ClassCastException in BIRT

="birthdate")     @Temporal(value = TemporalType.DATE)     private Date birthdate
Forum
1

Error using query with MAX() function

remark; @Basic @Temporal(value = TemporalType.TIMESTAMP) private Date changeDate; public
Forum
1

java.sql.Timestamp with milliseconds

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
Forum
1

Order in WHERE Clause affects behaviour on DATE/DATETIME columns

Quick example:  public class MyClass { @Column(name = "myText") String myText; @Temporal(TemporalType.TIMESTAMP) @Column(name = "myDate") Date myDate; } Now, when querying the db with: Query q = JPA.em().createQuery("SELECT m FROM MyClass m WHERE m.myDate LIKE