Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Embeddables and inheritance

On Tue, Aug 4, 2009 at 9:08 AM, Guy Pelletier <guy.pelletier@xxxxxxxxxx> wrote:
I believe the confusion or interpretation may of stemed from the definition of the @Inheritance and @MappedSuperclass
[...]
However, internally Eclipselink can already support those configurations but you have to set them manually using a descriptor customizer. Please enter a bug to have this corrected by the metadata processing.

Hello, Guy; thanks; I'll file a bug.

I admit to being somewhat confused by your response however, which addresses @Inheritance and @MappedSuperclass while I was discussing @Embeddables.  Are you saying that perhaps someone read the wrong part of the specification, or was incorrectly influenced by it, and that's the reason that one @Embeddable doesn't seem to be able to inherit from another?  I ask, because I'm not using the @Inheritance or @MappedSuperclass annotations at all; rather, I have:

@Embeddable
public class EmbeddableParent implements Serializable {
  //...
}

@Embeddable
public class EmbeddableChild extends EmbeddableParent {
  //...
}

@Entity // etc.
public class SomeEntity implements Serializable {
  @Embedded
  private EmbeddableParent foo;
}

@Entity // etc.
public class SomeOtherEntity implements Serializable {
  @Embedded
  private EmbeddableChild bar;
}

...and that causes EclipseLink to fail.

Best,
Laird

Back to the top