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.
|