«

»

Aug 08

A temporal type must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar

Error in title “A temporal type must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar” cab be found during development using JPA and Google App Engine. To solve this issue you have to correctly annotate the field oh type Date so:

@Entity
@Table(name="studio")
public class StudioDb {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id_studio;
    
    @Temporal(TemporalType.DATE)
    private Date start;
    @Temporal(TemporalType.DATE)
    private Date end;

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>