openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vld <knezevicvladi...@yahoo.com>
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:


> Parent.java
> 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: http://openjpa.208410.n2.nabble.com/Bidirectional-OneToMany-with-Enchancer-tp5091015p5100592.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message