-->
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: How to insert 'date' into mysql by using Hibernate
PostPosted: Tue Oct 14, 2008 12:33 pm 
Newbie

Joined: Thu Oct 02, 2008 10:43 am
Posts: 11
I am using Hibernate with mysql

I have one field 'date'

My code


public Date getDate() {

return date;
}

public void setDate(Date date) {

this.date = date;

}

My mapping file is

<property name="date" column="date"/>


I have table with field 'Date'in mysql


when I insert data it is not inserted into mysql

mysql default format is 'yyyy-mm-dd'

Please help me how to solve the problem? Can I enter the date as
'dd-mm-yyyy' and store same format in mysql.


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.