openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vld <>
Subject Re: Bidirectional OneToMany with Enchancer
Date Tue, 25 May 2010 21:37:20 GMT

Thank you for your reply.

Some of the examples I found never mentioned the need for manually setting
the relationship. Also, I have some ManyToMany relationships which are
automatically treated during persist and merge operations (well, they are
deleted and inserted instead of updated), and it lead me to conclusion it
might be handled without intervention.

There is one more thing that confuses me. If setting relationship is done in
domain classes, as in example:

> public void setChildren(Set<Children> children) {
>    for (Child c : children) c.setParent(this);
>    this.children = children;
> }
fetching Parent from DB with it's Children collection makes UPDATE of
Children executed. Is there anything I can do to avoid it?
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message