persistence@glassfish.java.net

Re: [Fwd: [Issue 486] Problem with abstract _at_Entity and _at_Id in b41]

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Thu, 30 Mar 2006 04:39:00 +0530

Linda,

Linda DeMichiel wrote:

> 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.

I thought that to be the case and hence had filed the bug. But spec is
not written the way we think things should work.

>
> (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.)

I wish the spec read that way. Unfortunately, the spec states the
following and I am not surprised that this lead to this confusion:
/If no inheritance *type* is specified for an entity class hierarchy,
the SINGLE_TABLE mapping strategy
is used./

So, are you going to make this change in the spec before it gets released?

Thanks,
Sahoo

>
> 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
>>