I don't see how this confusion could arise from the spec.
Inheritance applies as a result of the Java language "extends"
clause. You don't have to specify @Inheritance for it to
apply.
(The @Inheritance annotation is not required to be specified
for inheritance. See section 9.1.29, which states that if no annotation
is present, the single table per class hierarchy inheritance
strategy applies.)
Linda
Sanjeeb Kumar Sahoo wrote:
> Hi Mike,
>
> Would you mind having a look at this issue? The latest update suggest
> that user must specify @Inheritance in a class to indicate that that
> class is the root of the inheritance hierarchy. Why is this the case?
> Why can't root be identified by the persistence provider runtime by
> walking up the tree?
>
> Thanks,
> Sahoo
>
> ------------------------------------------------------------------------
>
> Subject:
> [Issue 486] Problem with abstract @Entity and @Id in b41
> From:
> pkrogh_at_dev.java.net
> Date:
> Wed, 29 Mar 2006 15:48:07 +0000
> To:
> issues_at_glassfish.dev.java.net
>
> To:
> issues_at_glassfish.dev.java.net
>
>
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=486
>
>
>
> User pkrogh changed the following:
>
> What |Old value |New value
> ================================================================================
> Issue type|DEFECT |ENHANCEMENT
> --------------------------------------------------------------------------------
> Priority|P3 |P4
> --------------------------------------------------------------------------------
>
>
>
>
> ------- Additional comments from pkrogh_at_dev.java.net Wed Mar 29 15:48:07 +0000 2006 -------
> This bug seems to be about the provider determining that inheritance is implied
> without specifying the @Inheritance annotation. This is not defined in the
> spec, and I believe that it was not the intention of the spec. The
> @Inheritance tag defines that Inheritance is needed.
>
> It seems like a nice usability feature, but it would potentially require the
> provider to walk the whole hierarchy instead of just looking for @Inheritance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: issues-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: issues-help_at_glassfish.dev.java.net
>