I just set cascade type on the field that I don't update but want the join
to be persisted.

-----Original Message-----
From: Christopher Gardner [mailto:chris.r.gard...@gmail.com] 
Sent: Saturday, 22 August 2009 3:25 AM
To: users@openjpa.apache.org
Subject: Superfluous Updates for a @ManyToOne in OpenJPA 1.2.1

Class A has a unidirectional many-to-one relationship with Class B.  I
change a property on a Class A object and persist the object.  The log shows
SQL update statements called for both A and B.  I have no cascade options
set on A's @ManyToOne.  I do not want any updates to B because it's not
logical to do so and it's inefficient. B represents standard, boilerplate
data for many A's.  Also, it adds no value for B to know about A.  No update
is appropriate in this context.  How do I stop updates to B?

Reply via email to