persistence@glassfish.java.net

Re: single access type for entire hierarchy?

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Wed, 15 Feb 2006 12:41:08 -0800

Adding Linda to the thread.

-marina

Sanjeeb Kumar Sahoo wrote On 02/15/06 10:22,:
> Hi Mike,
>
> Michael Keith wrote:
>
>
>>No, you can specify different access types in the XML mapping file.
>>
>>
>
> Thanks for responding. Now I see a small confusion for users here: what
> is the access type for class Derived in the following example? Is it
> PROPERTY because the Base class uses PROPERTY access or is it FIELD
> because the mapping file level default is FIELD?
>
> (Note: the XML fragment might not comply with orm schema, it is just
> used as example)
> <entity-mappings>
> <!-- mapping file level default is FIELD access-->
> <access>FIELD</access>
> <entity class="Base" access="PROPERTY">
> <entity>
> <entity class="Derived"> <!-- Derived extends Base -->
> <entity>
> </entity-mappings>
>
> Reading the spec, I don't find a clear cut answer. So my worry is do
> have such tests in CTS to ensure portability of applications?
>
> Thanks,
> Sahoo
>
>
>>-----Original Message-----
>
>>>From Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
>
>>Sent Wed 2/15/2006 5:46 AM
>>To persistence_at_glassfish.dev.java.net <persistence_at_glassfish.dev.java.net>; Mike Keith <michael.keith_at_oracle.com>
>>Subject single access type for entire hierarchy?
>>
>>Hi,
>>
>>[Section 2.1.1]
>>/A single access type (field or property access) applies to an entity
>>hierarchy./
>>
>>Is this rule applicable even when access type is specified on a per
>>class basis using orm.xml file?
>>
>>Thanks,
>>Sahoo
>>
>>
>>