Hi Pulat,
I checked the initialization value for 'updateLock' in FieldDescriptor class and it's 'true'. So if you don't specify a value the xml-parser should return 'true' or if this attribute was skipped the initial value (true) should be used in FieldDescriptor.
In OJB test-suite are several locking tests (OptimisticLockingTest.java) and all tests pass.
Maybe it's a parser/repository.dtd problem. You can enable OJB parsing result when change log-level for class RepositoryXmlHandler.java to 'debug'.
When using OJB default logger simply change entry for this class to 'debug' in OJB-logging.properties
regards, Armin
Pulat Yunusov wrote:
I found that update-lock is false by default, that is when I don't specify it in the locking field descriptor. When I set this attribute to true explicitly, OJB increments the version field for every insert and update.
I inspected the class-descriptor object passed to storeToDb() in PersistenceBrokerImpl#store() with a debugger, and its m_lockingFieldDescriptors attribute contained a FieldDescriptor object with the value of updateLock attribute equal to false. However, update-lock was not specified for that locking field in the class-descriptor in my mapping file.
According to the DTD at http://db.apache.org/ojb/repository.dtd.txt, the default value of update-lock is true. I am using OJB 1.0.0. Have I found a bug, and has anybody else experienced this?
Thanks,
Pulat
Pulat Yunusov wrote:
According to the OJB FAQ the version column "is incremented each time changes are committed to the object". The version column is the column described in field-descriptors with the "locking" attribute set to true.
However, I have never ever seen values in this column other than the default of zero. I assume this value should constantly grow with every update to the record but I have never seen that happen.
What is wrong?
Thank you,
Pulat
--------------------------------------------------------------------- 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]
