-----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 5:00 AM To: OJB Users List Subject: Re: ODMG locking and read only references
Hi Jean-Yves, Jean-Yves Sironneau wrote: > Hello, > > I would like to know if it's possible using ODMG to set auto-update to > "false" for a reference. > Because in the documentation it's supposed to be set to "none". But "none" > seem's to be "true". Sorry, the ODMG implementation expects these specific settings and no it's not allowed to change these settings. > > The issue is that i have a class Role that has a reference on a > DocumentBase, when i lock a Role for updating it, it also locks the > referenced DocumentBase, This should only happen if implicit locking is enabled. If you disable implicit locking, e.g. at runtime or in OJB.properties file http://db.apache.org/ojb/docu/guides/odmg-guide.html the referenced objects will not be locked. But nevertheless OJB will make a snapshot of the locked object with all referenced objects. > and materialize all the proxied objects within DocumentBase to > try to write lock them, OJB should never materialize proxy objects while locking the main object. Think there was a bug in <=1.0.4, it's fixed in SVN OJB_1_0_RELEASE and will be included in 1.0.5. If possible please test latest from SVN OJB_1_0_RELEASE branch. > and i really don't want that has DocumentBase can be > big and it's association with Role is just to say that a Role is for this > DocumentBase, and also because it's throwing a LockNotGrantedExcetion. > Sounds strange. Could it be that the same DocumentBase will be locked by different tx? > One solution would be to store the pk of the DocumentBase in Role, but i > would like to know if it's possible by keeping a "weak" reference to > DocumentBase > or not. Sorry, I can't see what you mean. How do you currently establish the reference? You always need a FK column to define a 1:1 relation. What do "weak" reference mean? regards, Armin > > Thank you. > > Jean-Yves > --------------------------------------------------------------------- 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]