-->
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.  [ 2 posts ] 
Author Message
 Post subject: Problem Mapping MySQL Time field
PostPosted: Mon Nov 10, 2008 8:08 am 
Newbie

Joined: Fri Jun 20, 2008 8:56 am
Posts: 15
Hello to all!!

I´m having a trouble mapping a MySQL TIME field.

The mapping line in the .hbm.xml file is like this:
Code:
<property column="hora_ini1" name="Start_Time1" type="time"/>


and the java field is:
Code:
private Time Start_Time1;


The error I get is:
java.sql.Time does not have a no-arg default constructor.


It seems that Time Class has no no-arg constructor and then Hibernate cannot make mapping.
Is this the right way to map a TIME field in Hibernate?
What am I doing wrong?

Thank´s


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2008 4:27 am 
Newbie

Joined: Fri Jun 20, 2008 8:56 am
Posts: 15
Any suggestion???


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

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.