Bug 1114699 - [GSS](6.4.0)HHH-9387 Join table name for @ElementCollection uses entity class name instead of specified entity name
Summary: [GSS](6.4.0)HHH-9387 Join table name for @ElementCollection uses entity class...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: DR11
: EAP 6.4.0
Assignee: Gail Badner
QA Contact: Martin Simka
URL:
Whiteboard:
Depends On:
Blocks: 1117447 1121629 1132207 1134738
TreeView+ depends on / blocked
 
Reported: 2014-06-30 17:15 UTC by Stephen Fikes
Modified: 2019-08-19 12:46 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
: 1117447 1132207 (view as bug list)
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Maven based testcase (3.39 KB, application/x-gzip)
2014-06-30 17:22 UTC, Stephen Fikes
no flags Details

Description Stephen Fikes 2014-06-30 17:15:36 UTC
Description of problem:
The table name computed for an @ElementCollection of @Embeddable uses the entity name instead of entity table name

Version-Release number of selected component (if applicable):
Hibernate core 4.2 and later

How reproducible:
Consistently

Steps to Reproduce:
1. Provide a table name for a entity which differs from the entity name:

@Entity
@Table(name = "prod")
public class Product {
    ...
}

2. Add collection of embeddable to the above entity
    @ElementCollection(fetch = FetchType.EAGER)
    private Set<Part> parts = new TreeSet<Part>();

Actual results:
Hibernate 4 computes the join table name as Product_parts

Expected results:
The table name should be prod_parts

Additional info:
- Hibernate 3 (which used @CollectionOfElements rather than @ElementCollection) computed the join table name as prod_parts
- This may be the same as https://hibernate.atlassian.net/browse/HHH-5417

Comment 1 Stephen Fikes 2014-06-30 17:22:35 UTC
Created attachment 913499 [details]
Maven based testcase

Comment 6 Gail Badner 2014-07-02 20:21:29 UTC
Corrected doc text.

Comment 9 Gail Badner 2014-07-08 02:29:01 UTC
Yes, please do. Thanks.

Comment 10 Gail Badner 2014-07-09 21:56:20 UTC
I don't think HHH-5417 is accurate any more. I've created a new Jira issue to reflect the current behavior:

https://hibernate.atlassian.net/browse/HHH-9280

Comment 11 sgilda 2014-07-30 12:25:36 UTC
Based on this comment in Bug 1119658:

    I noticed that two bugzillas representing the same issue are now in the release notes: 1114699 and 1117447 represent the same issue, but are targeted for a different EAP version. One of them should be removed from the release notes.

This one is targeted for 6.4, so removing the requires_doc_text flag on this bug.

Comment 12 Gail Badner 2014-11-21 02:55:52 UTC
Fixed for EAP 6.4.0

Comment 13 Gail Badner 2014-11-21 02:59:19 UTC
HHH-9280 was reverted by HHH-9327. Instead this is fixed by https://hibernate.atlassian.net/browse/HHH-9387 .

Comment 14 Kabir Khan 2014-11-21 11:35:13 UTC
Fixed by Hibernate 4.2.16.Final upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1121629

Comment 15 Martin Simka 2014-11-27 12:00:54 UTC
verified on EAP 6.4.0.DR11 / Hibernate 4.2.16


Note You need to log in before you can comment on or make changes to this bug.