openjpa-users mailing list archives

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


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:
  public void setChildren(List<Child> children) {
    this.children = children;
  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:
Sent from the OpenJPA Users mailing list archive at

View raw message