I ran into a severe problem while doing Hibernate reverse engineering from MySQL 5 to Java classes using MyEclispe Version: 7.1, Java jdk1.6.0_12 and Tomcat 6.0
When it run, the application is throwing the following exception:
javax.persistence.PersistenceException: org.hibernate.AnnotationException: @Temporal should be set on a java.util.Date or java.util.Calendar property: xxx.xxxxx.hibernate.pojo.XXX.startDate
The column in my table is:
start_date DATETIME
The generated code as the annonation as under:
Code:
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "start_time", length = 19)
So basically the code is adding an @Temporal annotation for TIMESTAMP, which is not allowed.
By the way, this problem started after I updated from MyEclipse 6 to 7. With MyEclipse 6, the TemporalType was getting generated as DATE, which has it's own set of problems:
Code:
@Temporal(TemporalType.DATE)
@Column(name="creation_date", unique=false, nullable=false, insertable=true, updatable=true, length=19)
@Column(name = "start_time", insertable=true, updatable=true, length = 19)
Are there any workarounds to suppress the TemporalType generation?
If not, when can I expect this bug to be fixed?
many thx in advance, please reply me!
I'm waiting 4 U
VAMBAD