persistence@glassfish.java.net

RE: code review for issue #831

From: Mike Keith <michael.keith_at_oracle.com>
Date: Tue, 8 Aug 2006 12:57:14 -0400

Gordon,

We included some language in the spec for determining the access type
of the embeddable because in entities there is always going to be some
metadata that distinguishes the PK, whereas embeddables do not have
primary key fields/properties defined in them. In the absence of metadata
there needs to be some way for the provider to determine the access type
of an embeddable and the owning entity was the obvious choice.

The intention was that providers not be required to support different
access types within entity hierarchies or across entities and embedded objects
or embedded primary keys. It is expected that vendors offer these kinds of
value as vendor additions as they are features that we just didn't have
time to properly specify given the complexity of doing so in annotations. I
fully expected TopLink and others to do so.

-Mike

> -----Original Message-----
> From: Gordon Yorke [mailto:gordon.yorke_at_oracle.com]
> Sent: Tuesday, August 08, 2006 11:59 AM
> To: Sanjeeb.Sahoo_at_Sun.COM
> Cc: persistence_at_glassfish.dev.java.net; Mike Keith (E-mail)
> Subject: RE: code review for issue #831
>
>
> Hello Sahoo,
> I have reviewed your code and have a suggestion. The
> Access Type of the Embeddable should still be determined
> based on annotations or XML (XML can define access type
> directly). This allows users to specify the access type of
> the Embeddable. If the access type is not available from the
> Embeddable then use the access type of the parent. The
> specification states that the access type can be 'determined'
> from that of the parent but is not mandated to be that of the
> parent( Mike, is that not the intention of the
> specification?) This would give users much more flexibility
> for sharing Embeddables.
> Also based on how TopLink treats Embeddable mappings we
> could, in the future, support a different access type for
> each target of an Embeddable mapping if the AccesType of the
> Embeddable was not supplied by the user.
> --Gordon
>
> -----Original Message-----
> From: Sanjeeb.Sahoo_at_Sun.COM [mailto:Sanjeeb.Sahoo_at_Sun.COM]On Behalf Of
> Sanjeeb Kumar Sahoo
> Sent: Monday, August 07, 2006 9:00 AM
> To: Tom Ware
> Cc: persistence_at_glassfish.dev.java.net
> Subject: code review for issue #831
>
>
> Hi Tom,
>
> Attached here with the suggested fix for
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=831 .
> The jar file contains modified sources in new folder,
> original sources
> in orig folder and differences in diffs folder.
> Please review them. I have update issue tracker with the details.
>
> Tests run:
> entity-persistence-tests(all of them passed)
> JPA TCK v1.0: 3 tests failed but they fail on a clean
> workspace as well
> (Yes, I have run those 3 tests in a clean workspace and they failed).
> So, my changes are not causing those failures.
>
> Appreciate a quick reply.
>
> Thanks,
> Sahoo
>
>
>