Incorrect default CollectionTable.name

Description

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

Activity

Show:

Former userJuly 9, 2014 at 9:49 PM

This should be fixed by HHH-9280.

Brett MeyerJuly 8, 2014 at 3:10 PM

Bulk rejecting stale issues. If this is still a legitimate issue on ORM 4, feel free to comment and attach a test case. I'll address responses case-by-case. Thanks!

Brett MeyerApril 7, 2014 at 5:48 PM

In an effort to clean up, in bulk, tickets that are most likely out of date, we're transitioning all ORM 3 tickets to an "Awaiting Test Case" state. Please see http://in.relation.to/Bloggers/HibernateORMJIRAPoliciesAndCleanUpTactics for more information.

If this is still a legitimate bug in ORM 4, please provide either a test case that reproduces it or enough detail (entities, mappings, snippets, etc.) to show that it still fails on 4. If nothing is received within 3 months or so, we'll be automatically closing them.

Thank you!

Rejected

Details

Assignee

Reporter

Components

Affects versions

Priority

Created July 27, 2010 at 1:15 AM
Updated July 9, 2014 at 9:49 PM
Resolved July 8, 2014 at 3:10 PM