]
Max Rydahl Andersen commented on ANN-642:
-----------------------------------------
moved to annotations project since hbm2dll simply dumps what annotations reports...
hbm2ddl is generating tables for classes annotated with
@MappedSuperclass
-------------------------------------------------------------------------
Key: ANN-642
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-642
Project: Hibernate Annotations
Issue Type: Bug
Components: binder
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: