Bug 413985 - Cannot use @AttributeOverride to override column name for an embeddable class in @ElementCollection
Summary: Cannot use @AttributeOverride to override column name for an embeddable class...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P2 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-30 07:58 EDT by Martin Burger CLA
Modified: 2022-06-09 10:33 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Burger CLA 2013-07-30 07:58:27 EDT
In one of my entity classes, I basically have a field of type Set<EmbeddableClass>, similar to the example in JavaDoc of javax.persistence.CollectionTable:

@Embeddable public class Address {
   protected String street;
   ... 
 }

@Entity public class WealthyPerson extends Person {
   @ElementCollection
   @CollectionTable(name="HOMES") // use default join column name
   @AttributeOverrides({
      @AttributeOverride(name="street", 
                         column=@Column(name="HOME_STREET"))
    })
   protected Set<Address> vacationHomes = new HashSet();
   ...
}

I would expect that collection table HOMES would contain column HOME_STREET but not STREET. However, in my case, that table actually has the latter (STREET). Thus, it seems that annotation @AttributeOverrides has no effect.

I am using EclipseLink 2.5.0 and MariaDB 5.5.31 with MySQL Connector/J 5.1.21.
Comment 1 Tom Ware CLA 2013-08-19 10:15:58 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Denne Lu CLA 2016-01-05 12:07:09 EST
I've got the same problem on Windows 7 with Eclipselink version 2.6.2
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:33:34 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink