This is not a hibernate problem, but a combination between a mysql driver version and hibernate.
I have just discovered that the MySQL JDBC driver 3.1.11 gives strange results when updating.
Even the simplest of applications, the tutorial with only an id, title and date to store,
results in a stored record of
id = huge number
date = 00-00-0000 00000
title =
Hibernate itself (using debug mode) is OK. With MySQL JDBC driver 3.0.11, everything is stored OK.
Does anyone know a probabl;y cause, or does anyone else experience troubles with this?
I have not yet tested the driver stand-alone.
Hibernate version:
3.0.5
Mapping documents:
The chapter 2 tutorial.
Full stack trace of any exception that occurs:
Name and version of the database you are using:
MySQL 4.1.12
MySQL JDBC driver 3.1.11
The generated SQL (show_sql=true):
insert into EVENTS (EVENT_DATE, TITLE, EVENT_ID) values (?, ?, ?)
(This is OK)
This is trying to insert:
Event{title=My Event, date=2005-11-13 19:55:21, id=1}
Debug level Hibernate log excerpt:
(indicates no problem)
|