openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Håkon Sagehaug <>
Subject Entity that referring to it self
Date Tue, 20 Jan 2009 15:59:35 GMT

I want to have some thing like this. Ive got a Project entity, and now i
want this project to include  a list of other projects, like related
projects, but struggling a bit how to annotate this and how to design the

Some thoughts:

1. Create a new entity class that holds a pair of projects, and a list of
this entity e.g ProjectPair
2 Have it mapped, could one us @MapKey(name="project_id") and have a map of
friends projects
3. Or as a many-to-many or one-to-many, not sure what is is

any hints on this?

cheers, Håkon
Håkon Sagehaug, Software Developer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)

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