If you want to make a OneToOne relation the following code does the trick:
@OneToOne
@Column(name="class_id")
Where class is the name of the class being related to this entity. For
example, if it's the class User:
@OneToOne
@Column(name="user_id")
Regards.
For more information:
http://code.google.com/p/simplejpa/wiki/WhatsSupported
How to I enable @OneToMany relationship?
survey.setSurveyId(RandomUUID.getUUID(10));
survey.setStartDate(new Date());
survey.setName("sgsdfgsdfh");
SDBDomain domain = new SDBDomain();
domain.setSurvey(survey);
survey.getDomains().add(domain);
domain = new SDBDomain();
domain.setSurvey(survey);
survey.getDomains().add(domain);
EntityManager em = getEntityManager();
em.persist(survey);
em.close();
this does not store the domains.