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.  [ 2 posts ] 
Author Message
 Post subject: MySQL driver 3.1.11 gives erroneous updates
PostPosted: Sun Nov 13, 2005 3:11 pm 
Newbie

Joined: Sun Nov 13, 2005 3:00 pm
Posts: 1
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)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 13, 2005 7:39 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I did come across a JDBC bug with Date fields and NULLs with that driver. Use the latest (or the most stable verison that you can find) of the JDBC driver.


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