-->
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 map a negative Time
PostPosted: Mon Jul 02, 2007 6:45 am 
Newbie

Joined: Wed Dec 20, 2006 4:42 am
Posts: 1
Hibernate version: Hibernate 3

Mapping documents:
<property
name="timeOffset"
type="java.sql.Time"
column="TIME_OFFSET"
/>


Full stack trace of any exception that occurs:
ERROR [org.hibernate.util.JDBCExceptionReporter] java.sql.SQLException: Bad format for Time '-00:00:01' in column 6


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

Hi,

i am trying to map a "negative time".

What i mean is: in my DataBase (MySql 5), there is a column with the type "TIME". That kind of type, has the form 'HH:MM:SS' a range from '-838:59:59' to '838:59:59'. So, you can save a "negative" time.

I have tryed to map it like that:

<property
name="timeOffset"
type="java.sql.Time"
column="TIME_OFFSET"
/>

and

private Time timeOffset

but it's not working:


ERROR [org.hibernate.util.JDBCExceptionReporter] java.sql.SQLException: Bad format for Time '-00:00:01' in column 6


So, my question is how can I map a negative time ?


Any help or idea will be really wellcome.


Ezequiel.


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.