Hi, We are not using proxies for references. Thanks Rajadurai.
-----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 18, 2006 8:56 PM To: OJB Users List Subject: Re: Optimistic Locking with PB API for 1:M Hi Rajadurai, Rajadurai K wrote: > Hi, > We are using OJB PB API in one of out application. we are trying to do > the locking for the following > scenario. > > > class A{ > some fields; > Integer versionMaintainedbyOjb; > Collection Cs; > } > Class C { > some fields > A a > Integer versionMaintainedbyOjb; > } > > > In our repository.xml We had given auto-update="object" for both > collection-descriptor and reference descriptor. > We gave locking="true" for versionMaintainedbyOjb in the class descriptor of > both the class. > > When we try to update Object of "A" which is having collection of objects of > C. > First updating of each object in the collection is happening. At that time > value of "versionMaintainedbyOjb" for A is getting > updated in the data base. So finally when we try to update A it is giving > OptimisticLockException. > So you only call broker.store(A) in your source? If not could you please post a code example or some pseudo code? Do you use proxies for the references? regards, Armin > Am i going in the right way?. Please help me. Thanks in advance. > > Rajadurai. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]