Okay we have given you different answers, which just goes to show:
a) the spec is not clear enough on some of these issues and we both
had different ideas of what we were implying
b) we have to talk about it between us
We'll get back to you on it.
> -----Original Message-----
> From: Linda DeMichiel [mailto:Linda.Demichiel_at_Sun.COM]
> Sent: Wednesday, February 15, 2006 5:23 PM
> To: Sanjeeb Kumar Sahoo
> Cc: persistence_at_glassfish.dev.java.net; Michael Keith; Bill Shannon;
> Linda DeMichiel
> Subject: Re: single access type for entire hierarchy?
>
>
> Sahoo, you are asking good questions.
>
> This should be treated the same as with annotations.
>
> The use of multiple access types within a single
> class hierarchy is not supported by the spec
> (although it is likely we will add such support
> in a future release).
>
> If the use of the XML descriptor causes multiple
> access types to be defined within the classes of
> a single class hierarchy, the behavior is unspecified.
> Applications that use this attribute inconsistently
> will not be portable.
>
> Linda
>
>
>
> Sanjeeb Kumar Sahoo wrote:
>
> > 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
> >>
> >>
> >>
>