So if you don't use the PCEnhancer, the full object graph will be updated? Ouch!
On Fri, Aug 21, 2009 at 6:18 PM, Christopher Gardner < chris.r.gard...@gmail.com> wrote: > I'm not enhancing the classes in any way. BTW, I'm running outside of a > JEE container. > > > On Fri, Aug 21, 2009 at 5:40 PM, Michael Dick <michael.d.d...@gmail.com>wrote: > >> >> That's embarrassing - it's right in the subject.. >> >> By any chance are you using RuntimeUnenhancedClasses (if you're running >> the >> PCEnhancer then you're not and it _should_ all work). If you are then >> trying >> runtime enhancement might help. >> >> Sorry for missing the subject earlier. >> >> -mike >> >> >> Christopher Gardner wrote: >> > >> > 1.2.1 >> > >> > On Fri, Aug 21, 2009 at 5:24 PM, Michael Dick >> > <michael.d.d...@gmail.com>wrote: >> > >> >> >> >> Which version of OpenJPA are you using? >> >> >> >> This sounds like http://issues.apache.org/jira/browse/OPENJPA-843 >> >> OPENJPA-843 . >> >> >> >> -mike >> >> >> >> >> >> Christopher Gardner wrote: >> >> > >> >> > No matter what value I set cascade to, the update statement prevails. >> >> > Here >> >> > is the last setting. I've tried every value. >> >> > class A { >> >> > @ManyToOne(optional = false, cascade = CascadeType.REMOVE) >> >> > @JoinColumn(name >> >> > = "b_id") >> >> > private B b; >> >> > } >> >> > >> >> > On Fri, Aug 21, 2009 at 4:54 PM, Christopher Gardner < >> >> > chris.r.gard...@gmail.com> wrote: >> >> > >> >> >> What value of the cascade type do you set? >> >> >> >> >> >> >> >> >> On Fri, Aug 21, 2009 at 4:42 PM, C N Davies <c...@cndavies.com> >> wrote: >> >> >> >> >> >>> 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? >> >> >>> >> >> >>> >> >> >> >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> >> http://n2.nabble.com/Superfluous-Updates-for-a-ManyToOne-in-OpenJPA-1-2-1-tp3492419p3492691.html >> >> Sent from the OpenJPA Users mailing list archive at Nabble.com. >> >> >> > >> > >> >> -- >> View this message in context: >> http://n2.nabble.com/Superfluous-Updates-for-a-ManyToOne-in-OpenJPA-1-2-1-tp3492419p3492745.html >> Sent from the OpenJPA Users mailing list archive at Nabble.com. >> > >