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]



Reply via email to