-->
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: @TemporalType.DATE and SQLServer DB problem
PostPosted: Mon Nov 08, 2010 9:56 am 
Newbie

Joined: Mon Nov 08, 2010 9:54 am
Posts: 1
Greetings! I am relatively new to java, and very new to hibernate, so hopefully this question will be easy to understand and provide a little help on.

I have set up a table which contains a date field as part of a primary key. According to other documentation that I have read, this is the correct syntax:

@Temporal(TemporalType.DATE)
private Calendar TransactionDate;

I use Calendar or GregorianCalendar everywhere to initialize the data for this column, but in every instance and in looking at the column properties, I see that the data stored there is of type TIMESTAMP.
The code I'm using to set the data is either:
Calendar today = Calendar.getInstance();
or:
Calendar today = new GregorianCalendar();

I really, really only want to see a date in that column. Can someone point out what I might be doing wro


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.