-->
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.  [ 3 posts ] 
Author Message
 Post subject: TimeStamp 000000000000 problem
PostPosted: Mon Jun 11, 2007 4:53 am 
Newbie

Joined: Mon Jun 11, 2007 4:42 am
Posts: 7
Location: Italy
Hi

I have a problem with a database i'm trying to wire up with Hibernate. In the database there are some timestamp field in timestamp column with "00000000000000" value inside and when I hit that row i got a Hibernate exception telling that Hibernate can not convert that timestamp to a date.
I can't change the values of that timestamps, how can I avoid Hibernate throwing that exception?
I mapped that field as java.util.Date in java classes and as timestamp in the Hibernate configuration files.

Thank you for helping me.


Top
 Profile  
 
 Post subject: Re : TimeStamp 000000000000 problem
PostPosted: Mon Jun 11, 2007 9:25 am 
Newbie

Joined: Mon Dec 11, 2006 12:54 am
Posts: 14
Hi,

What length are you specifying for the timestamp property in your configuration file?

Try with length=26, other than this i dont see any problem. If you are trying to use that column in your code you shouldn't get any problem..You might get an exception only if you're trying to convert that field to date and use in your program.


Top
 Profile  
 
 Post subject: Re: Re : TimeStamp 000000000000 problem
PostPosted: Mon Jun 11, 2007 12:01 pm 
Newbie

Joined: Mon Jun 11, 2007 4:42 am
Posts: 7
Location: Italy
suvendu wrote:
Hi,

What length are you specifying for the timestamp property in your configuration file?

Try with length=26, other than this i dont see any problem. If you are trying to use that column in your code you shouldn't get any problem..You might get an exception only if you're trying to convert that field to date and use in your program.


Yes, this is my problem, i need to wrap that timestamp in a java.util.Date inside my application, any solution for this? I can't remove or change the field with 0000000000000 timestamp.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.