Class: com.sybase.djc.ant.AddVersionFieldProperty (Add Version Field Property) | EAServer 6.3 Help |
---|
Description | This property is used to configure an additional persistent version field for an entity that is generated during deployment of EJB entity beans. Additional version fields may be useful on parent entities for which child entities use parentVersion (Persistent Object Property) or parentVersion (Query Method Property). An entity may have any number of additional version fields. An additional version field is incremented automatically when a child (using parentVersion to refer to the additional field) is inserted, deleted or updated. |
---|---|
Configuration |
Configuration is achieved using an XML (Ant) configuration script, such as the following: <project name="ejbjar-example-user"> <import file="ant-config-tasks.xml"/> <target name="configure-user"> <setProperties component="ejb.components.example.Customer"> <persistentObject table="my_customer" versionColumn="c_version" /> <addVersionField field="otherVersion" column="c_other_version" /> </setProperties> </target> </project>This example assumes the prior deployment of an EJB-JAR file named example.jar. The above script would be placed in file ejbjar-example-user.xml in the config directory of your EAServer installation. To run the script, assuming that the bin directory of your EAServer installation is in the PATH, you would use one of the the following commands: recompile ejbjar-example-user (Windows) recompile.sh ejbjar-example-user (Unix / Linux) Alternatively, the above script can be named sybase-ejbjar-config.xml and placed alongside ejb-jar.xml in the META-INF directory inside an EJB-JAR file (prior to deployment). Note: you can define multiple properties, for multiple components, in the same configuration script. |
Nested Properties | column, field |
Property: column (Column) | |
---|---|
Description | Specifies the database column name. Defaults to the field name. |
Property: field (Field) | |
---|---|
Description | Required. Specifies a name for the additional version field. |