openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Saint Croix" <saintx.opensou...@gmail.com>
Subject Re: OneToMany(mappedBy...) special case
Date Fri, 14 Dec 2007 14:30:20 GMT
Gene,

This is actually a great idea.  I think I'll take the suggestion.

Warm regards,
--
Alex



On Dec 14, 2007 1:03 AM, Gene Woo <genewoo@gmail.com> wrote:

> Hi,
>
> PartyRole could have 2 fields in Set<PartyRelationship>:
> * private @OneToMany(mappedBy="primaryPartyRole")Set<PartyRelationship>
> primaryRelationships;
>  private @OneToMany(mappedBy="secondaryPartyRole")Set<PartyRelationship>
> secondaryRelationships;*
>
> then you could have a method to merge then together. Set is quite easy to
> merge, right?
> *public Set<PartyRelationship> getPartyRelationships();*
>
> In my opinion, the combination of primaryRelationships and
> sencondaryRelationships is a business view of PartyRole model. So you
> probably have separate field for persistence purpose.
>
> Thanks,
>
> Gene.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message