[hibernate-issues] [Hibernate-JIRA] Resolved: (ANN-642) hbm2ddl is generating tables for classes annotated with @MappedSuperclass

Diego Pires Plentz (JIRA) noreply at atlassian.com
Thu Jul 26 12:07:52 EDT 2007


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

Diego Pires Plentz resolved ANN-642.
------------------------------------

    Resolution: Rejected

> 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: 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