openjpa-users mailing list archives

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

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
database.

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)

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