Oracle® Application Development Framework Developer's Guide
10g Release 3 (10.1.3) B25386-01 |
|
![]() Previous |
![]() Next |
You can use the databindings.cpx
file to override or modify the default TopLink data control behavior. This section includes information on the following options:
Refer to Appendix A, "Reference ADF XML Files" for additional information on parameters in the databindings.cpx
file.
Use the TopLinkDefinitions Properties dialog (see Figure 19-1) define these parameters on the data control.
By default, the TopLink unit of work (see Section 3.8, "Creating and Modifying Objects with a Unit of Work") performs insert operations before delete operations. However, there may be instances in which you must perform the delete operation first.
For example, removing a row with a primary key of 1 and then creating a new row with the same primary key within the same transaction will result in a SQL exception indicating that the row already exists.
To eliminate this problem, use the TopLinkShouldPerformDeletesFirst parameter in the databindings.cpx
file to force the unit of work to perform the delete operation first.
Example 19-1 Specifying the TopLinkShouldPerformDeletesFirst Option
... <Parameter name="TopLinkShouldPerformDeletesFirst" value="True" </Parameter ...
By default, the TopLink session configuration file is named sessions.xml
. You can create this file by using the Mapping editor in Oracle JDeveloper (refer to the Oracle JDeveloper online help for more information).
To specify a different sessions configuration file, use the TopLinkSessionsXMLFileName parameter in the databindings.cpx
file.
By default, the TopLink unit of work (see Section 3.8, "Creating and Modifying Objects with a Unit of Work") assigns sequence numbers during the commit operation. However, there may be instances in which the sequence number must be displayed in the user interface before the commit operation.
For example, if the sequence number is used as the value of an ID field in a form displayed to the user, you must have the sequence number before committing the transaction.
To eliminate this problem, use the TopLinkSequenceOnCreate parameter in the databindings.cpx
file to disable the assigning of the sequnce number during the commit operation of a create transaction