Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Question on @PrivateOwned

Morning everyone,

I have a question on the use of the @PrivateOwned annotation. The
documentation on the
wiki seems to indicate that the annotation is of use from an instance
view, as opposed to
the static view of a domain model. Let me clarify what I mean by that.

The documentation seems to indicate that two different types of
objects (T1, T2) could each
declare they privately own an object of the same type (T3), where that
would only be a
problem if a given instance of T3 were referenced by both an instance
of T1 and T2. In that
case, T1 and T2 cannot both privately own the instance of T3 that they
reference since at
that point the instance is then shared.

Suppose class A and class C both have say a OneToOne relationship to
class B and both
OneToOne relationships bear the @PrivateOwned annotation. Further,
suppose at runtime that
no instance of B will be referenced by an instance of A and an
instance of C. At runtime,
either an instance of A will reference an instance of B or an instance
of C will reference
an instance of B. Would/should EclipseLink (1.0.1 at least) have any
complaints at Project
initialization time or at any point during runtime?

This question is due to further analysis of EclipseLink 1.0.1 defect 264406.

Thank you,

Doug


Back to the top