Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Configuring Existence Checking at the Project Level

When TopLink writes an object to the database, it runs an existence check to determine whether to perform an insert or an update operation.

By default, TopLink checks against the cache. Oracle recommends that you use this default existence check option for most applications. Checking the database for existence can cause a performance bottleneck in your application.

Table 22-8 summarizes which projects support existence checking configuration.

Table 22-8 Project Support for Existence Checking

Descriptor Using TopLink Workbench
Using Java

Relational Projects

Supported.


Supported.


EIS Projects

Supported.


Supported.


XML Projects

Unsupported
Unsupported

By default, this configuration applies to all descriptors in a project. You can also configure existence checking at the descriptor level to override this project-level configuration on a descriptor-by-descriptor basis. For more information, see "Configuring Cache Existence Checking at the Descriptor Level".

For more information see:

Using TopLink Workbench

To specify the existence checking information, use this procedure:

  1. Select the project object in the Navigator.

  2. Select the Defaults tab in the Editor. The Defaults tab appears.

    Figure 22-6 Defaults Tab, Existence Checking Options

    Description of Figure 22-6  follows
    Description of "Figure 22-6 Defaults Tab, Existence Checking Options"

  3. Complete the Existence Checking options on the tab.

Field Description
Check Cache Check the session cache. If the object is not in the cache, assume that the object does not exist (do an insert). If the object is in the cache, assume that the object exists (do an update).

Oracle recommends using this option for most applications.

Check Database If an object is not in the cache, query the database to determine if the object exists. If the object exists, do an update. Otherwise, do an insert.

Selecting this option may negatively impact performance. For more information, see "Check Database".

Assume Existence Always assume objects exist: always do an update (never do an insert).

For more information, see "Assume Existence".

Assume Nonexistence Always assume objects do not exist: always do an insert (never do an update).

For more information, see "Assume Nonexistence".