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