hbm2ddl is generating tables for classes annotated with @MappedSuperclass
-------------------------------------------------------------------------
Key: HBX-966
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-966
Project: Hibernate Tools
Issue Type: Bug
Components: ant
Affects Versions: 3.2beta8
Environment: Hibernate 3.2
MySQL 5
Reporter: Ezra Epstein
I've a class annotated as:
@Entity
@MappedSuperclass
public abstract class BaseUuidKeyedEntity implements Serializable {
...
}
The relevant section of the EJB3 persistence spec reads, in part:
"9.1.36 MappedSuperclass Annotation
The MappedSuperclass annotation designates a class whose mapping information is applied to
the
entities that inherit from it. A mapped superclass has no separate table defined for it.
A class designated with the MappedSuperclass annotation can be mapped in the same way as
an
entity except that the mappings will apply only to its subclasses since no table exists
for the mapped
superclass itself...."
So no Table should be associated with this class.
Yet the resultant DDL includes:
create table BaseUuidKeyedEntity (
uuid varchar(31) not null,
create_ts datetime,
update_ts datetime,
versionNum integer,
primary key (uuid)
);
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira