1.      In your table you need a dedicated column of type INTEGER or
TIMESTAMP . Say the column is typed as INTEGER and named
VERSION_MAINTAINED_BY_OJB . 

2.      You then need a (possibly private) attribute in your java class
corresponding to the column. Say the attribute is defined as: 

        private int versionMaintainedByOjb;
3.      in repository.xml you need a field-descriptor for this attribute.
this field-descriptor must specify locking="true" The resulting
field-descriptor will look as follows: 

        <field-descriptor

        name="versionMaintainedByOjb"

        column="VERSION_MAINTAINED_BY_OJB"

        jdbc-type="INTEGER"

        locking="true"

/>

                

See also: http://db.apache.org/ojb/repository.html#field-descriptor
<http://db.apache.org/ojb/repository.html#field-descriptor> 



> -----Original Message-----
> From: Anton Komratov [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
> Sent: Friday, September 12, 2003 9:58 PM
> To: OJB user list
> Subject: versioning and OJB
>
>
> Are there any thoughts how to implement versioning using OJB?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to