Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » @AttributeOverride ignored with @Embedded
@AttributeOverride ignored with @Embedded [message #1007091] Mon, 04 February 2013 07:13 Go to next message
Emanuele Gesuato is currently offline Emanuele Gesuato
Messages: 11
Registered: December 2012
Junior Member
Hi there,

we are using eclipse link 2.4 and we are having some issues on @AttributeOverride that seems to be ignored when we are referring to an @Embedded reference.

Here our scenario:
Person person
|-- Address myAddress
|-- Address secondaryAddress

where:
Address
|-- Zip myZip
|-- Zip mySecondaryZip
|-- String name

Zip
|-- Country myCountry
|-- String zipCode

Country
|-- String description

Address, Zip and Country classes are declared as @Embeddable(). Person is an @Entity.

myAddress has the following JPA annotations:
    @Embedded()
@AttributeOverrides({ @AttributeOverride(column = @Column(name = "myaddress_name"), name = "name"),
        @AttributeOverride(column = @Column(name = "myaddress_myzip_zipcode"), name = "myZip.zipCode"),
        @AttributeOverride(column = @Column(name = "myaddress_myzip_mycountry_description"), name = "myZip.myCountry.description"),
        @AttributeOverride(column = @Column(name = "myaddress_mysecondaryzip_zipcode"), name = "mySecondaryZip.zipCode"),
        @AttributeOverride(column = @Column(name = "myaddress_mysecondaryzip_mycountry_description"), name = "mySecondaryZip.myCountry.description") })
private Address myAddress = null;



Using eclipseLink and postgresql the columns:

myaddress_myzip_zipcode
myaddress_myzip_mycountry_description

are not created in person table. The others are correctly created. We are using JPA 2.0 and postgresql 9.2. Why does it happen ? Am I missing something obvious ?
Is there a problem with a three level-nested path ?

Thanks
Re: @AttributeOverride ignored with @Embedded [message #1007354 is a reply to message #1007091] Tue, 05 February 2013 10:39 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Seems like it could be a bug, please log a bug with a test case.


James : Wiki : Book : Blog : Twitter
Previous Topic:Where to download MOXy 2.2 ?
Next Topic:dbws utils generated war file gives error : _dbws.DBWSProvider is not available
Goto Forum:
  


Current Time: Wed Jul 30 01:03:02 EDT 2014

Powered by FUDForum. Page generated in 0.01643 seconds