openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vld <knezevicvladi...@yahoo.com>
Subject Bidirectional OneToMany with Enchancer
Date Sun, 23 May 2010 15:36:23 GMT

Hi!

I'm using OpenJPA 1.2.2 with Enhancer default for eclipse environment. When
I try to persist objects with bidirectional OneToMany relationship, an error
occurs which shows that OneToMany List contains all the objects added to
collection, but none of the objects in collection has it's ManyToOne
relation set. My setter methods just add objects:
Parent:
  public void setChildren(List<Child> children) {
    this.children = children;
  }
Child:
  public void setParent(Parent parent) {
    this.parent = parent;
  }

Should this be enough, or do I have to do something more? Some of the
examples I found do only this kind of setting values.
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Bidirectional-OneToMany-with-Enchancer-tp5091015p5091015.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message