These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Some problems about Hibernate 3.2
PostPosted: Sat Apr 11, 2009 1:27 am 
Newbie

Joined: Sat Apr 11, 2009 1:21 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.