You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Mahler Thomas <th...@itellium.com> on 2003/09/12 11:20:10 UTC
RE: versioning and OJB
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:a.komratov@lynx.ru
<ma...@lynx.ru> ]
> 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: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>