Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
![]() Previous |
![]() Next |
Conforming is a query feature that lets you include new, changed, or deleted objects in queries within a unit of work prior to committing the transaction. This feature enables you to query against your relative logical or transaction view of a data source.
Table 28-5 summarizes which descriptors support descriptor level unit of work conforming.
Table 28-5 Descriptor Support for Unit of Work Conforming
Descriptor | Using TopLink Workbench
|
Using Java
|
---|---|---|
Relational DescriptorsFoot 1 |
|
|
Object-Relational Descriptors |
![]() |
|
EIS DescriptorsFoot 2 |
|
|
XML Descriptors |
![]() |
![]() |
Footnote 1 Relational class descriptors only (see "Relational Class Descriptors").
Footnote 2 EIS root descriptors only (see "EIS Root Descriptors")
When you configure a descriptor to conform results in a unit of work, when you execute a query in the unit of work, TopLink filters the data source result set to the changes currently made in the unit of work. TopLink adds new or changed objects that correspond to the query's selection criteria and removes changed objects that no longer correspond to the query's selection criteria.
Note: For EIS root descriptors, only deleted objects would be filtered, not new or changed objects. |
Conforming can reduce performance. Before you enable a descriptor for conforming, be aware of its limitations (see "Guidelines for Using Conforming") and make sure that conforming is actually necessary.
For examples, see the following:
To conform a descriptor's results in a unit of work, use this procedure:
Select a descriptor in the Navigator. Its properties appear in the Editor.
Click the Descriptor Info tab. The Descriptor Info tab appears.
Figure 28-3 Descriptor Info Tab, Conform Results in Unit of Work Option
Enable or disable conforming: when enabled, this feature ensures that any queries for this descriptor will conform the data source result with the current changes in the unit of work. For more information, see "Guidelines for Using Conforming".
Use ClassDescriptor
method setShouldAlwaysConformResultsInUnitOfWork(true)
.