[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5417) Incorrect default CollectionTable.name

Steve Mitchell (JIRA) noreply at atlassian.com
Mon Jul 26 19:15:35 EDT 2010


Incorrect default CollectionTable.name
--------------------------------------

                 Key: HHH-5417
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5417
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.5.3
         Environment: Hibernate 3.5.3-Final, PostgreSQL 8.2, J2SE 6
            Reporter: Steve Mitchell


According to the JPA 2.0 spec (11.1.8), the default value of @CollectionTable.name contains the name of the containing entity.  However, the 3.5.3 implementation instead inserts the *default* name of the containing entity (simple class name), ignoring any configured name of the containing entity.

This bug makes it impossible (AFAIK) to use an @ElementCollection in a @MappedSuperclass without hard-coding Java class names into the table structure.  In particular, it is impossible in this situation to configure preexisting collection table names.
  
Example code is posted in this forum thread.
https://forum.hibernate.org/viewtopic.php?f=1&t=1005951
The example will work only if the collection tables are titled "entitya_items" and "entityb_items", after the Java class names "EntityA" and "EntityB".





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