[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7053) Extending org.hibernate.id.IdentityGenerator causes wrong DDL

Rafal Figas (JIRA) noreply at atlassian.com
Fri Feb 10 17:34:12 EST 2012


Extending org.hibernate.id.IdentityGenerator causes wrong DDL
-------------------------------------------------------------

                 Key: HHH-7053
                 URL: https://hibernate.onjira.com/browse/HHH-7053
             Project: Hibernate ORM
          Issue Type: Bug
          Components: core
    Affects Versions: 3.6.10
         Environment: MySQL/HSQLDB
            Reporter: Rafal Figas


Create class:

public class Generator extends org.hibernate.id.IdentityGenerator
{
}

Use it as generator in hbm mapping file:
<generator class="sample.Generator"  ></generator>


It will result in:
1. ID field doesn't get auto_increment attribute (in MySQL).
2. Due to (1) attempt to save entity causes Exception due to: "Field 'IDaccount' doesn't have a default value".

Exception occurs with similar message in HSQLDB as well.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list