[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2618) Hibernate 3.2.4GA incompatiable with MySQL by using JPA

Steve Ebersole (JIRA) noreply at atlassian.com
Fri May 18 09:52:04 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-2618.
-------------------------------

    Resolution: Duplicate

> Hibernate 3.2.4GA incompatiable with MySQL by using JPA
> -------------------------------------------------------
>
>                 Key: HHH-2618
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2618
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.4
>         Environment: Hibernate 3.2.4GA
> MySQL 4.0.20-standard 
>            Reporter: Anthony Tam
>
> I have downloaded the HelloWorld example and try to use Hibernate. I have changed the persistence.xml to use the MySQL database. The configuration I changed are
> <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
> <property name="hibernate.connection.url" value="jdbc:mysql://(mysql database)" />
>    <property name="hibernate.connection.username" value="username" />
>    <property name="hibernate.connection.password" value="password" />
>  <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
> When I am using the Hibernate core shipped with the example, that is version 3.2.0.cr5, it works totally fine. After that, I download the latest Hibernate core from your website and replace the hibernate3.jar with the latest one, I encounter the an error when I try to presist the Message object into the database.
> The error is a SQLError bounced from MySQL saying that the field of ID is not supplied. When I turn on the SQL debug, I found that in version 3.2.0.cr5, the ID field is set to NULL and in version 3.2.4GA, the ID field is ?.
> I can figure a work around to tempory fix this issue, I use the annotation
> @org.hibernate.annotations.Entity(
> 	dynamicInsert = true
> )
> to ask hibernate to dunamic generate the SQL statment and then the ID field will not be supplied in the insert SQL.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list