This content has been marked as final.
Show 2 replies
-
1. Re: Seam-gen and
masotime Jun 24, 2009 6:13 AM (in response to masotime)Gah... sorry about the title. I meant to name it something like
Difficulties with Seam-gen and master-detail relationships
. -
2. Re: Seam-gen and
masotime Jun 24, 2009 2:33 PM (in response to masotime)Nevermind. I believe I have figured it out. I tried doing it in reverse, using generate-model to generate the Entity beans, and I discovered that the line
@OneToMany(mappedBy="fruitFamily") private Set<Fruit> fruits;
was slightly different from the one generated by seam-gen. In particular, the set had a default initialized value rather than being null.
private Set<Fruit> fruits = new HashSet<Fruit>();
This seemed to solve the problem.