users@glassfish.java.net

_at_Embedded with _at_Overriding

From: Olivier Chorier <lapsus63_at_gmail.com>
Date: Fri, 25 Feb 2011 20:33:30 +0100

Hi,

Let's consider an embeddable class Address. I need to use it twice in an
abstract class. So I need to override attributes with @AttributeOverrides.
Everything is ok at this point.

Now, I need to write a concrete class, but I need to change the
@AttributeOverrides for this class (for compatibility reasons). I tried to
@Override my getter end then re-writing my @AtttributOverrides, but the
abstract declaration is used instead.

Is it possible to define another attribute overriding in a concrete class
when it has already been defined in the abstract one ?

The problem is the same with the @Column anoation. I defined a name for my
column in my abstract class, and in the concrete one, but the abstract
definition was used instead of the concrete one.

Thanks a lot for help.

Olivier.