Skip to main content

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

The same class could be privateOwned by more than one class, the same
instance should not be.


Doug Gschwind wrote:
> 
> 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
> 
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/Question-on-%40PrivateOwned-tp22310611p22329455.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top