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