openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: Are relation sets identity, pk or bean.equals() based?
Date Thu, 14 Dec 2006 00:47:14 GMT
> -----Original Message-----
> From: Dain Sundstrom [mailto:dain@iq80.com] 
> Sent: Wednesday, December 13, 2006 2:56 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Are relation sets identity, pk or bean.equals() based?
> 
> What I'm really asking is when OpenJPA loads a one-to-many field,  
> what kind of collection is injected into the bean?  Is it a 
> plain old  
> HashSet?  If not, what does the collection use to determine equality  
> between elements?

It's a dynamically-generated subtype of whatever type that you specify
in the field declaration. So, you need to have a no-args constructor and
the class can't be final.

If you declare the field to be an interface type and you don't
initialize the field to anything, I don't remember how we decide what
impl to use.

-Patrick
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Mime
View raw message