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: Datatype for MySQL "date"
PostPosted: Sun Jun 26, 2005 4:28 pm 
Newbie

Joined: Sun Jun 26, 2005 4:22 pm
Posts: 1
I have an existing MySQL Database and now I want to map it with hibernate 3. Can someone tell me which datatype I have to use to map the mysql Type "date"?

Thanks in advance
Regards Michael Ernst

Hibernate Version:3

Name and version of the database you are using: MySQL 4.1


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 26, 2005 7:08 pm 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
Why don't you read the manual, e.g. chapter 6.1.9?

Use
Code:
<property name="dateAttribute" column="date_column" type="date"/>

Best regards
Sven


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.