Skip Headers

# Using an ObjectLevelReadQuery With an AsOfClause

Previous

Next

You can query historical versions of objects using an `ObjectLevelReadQuery` configured with an `AsOfClause` (set by `ObjectLevelReadQuery` method `setAsOfClause`) that specifies a point in time that applies to every `Expression` used in the query.

This type of historical query lets you query a static snapshot of object versions as of the specified time.

Note: To prevent corrupting the global shared cache with old versions of objects, you must set `ObjectLevelReadQuery` method `maintainCache` to `false` in this historical query. If you do not, TopLink will throw an exception when you execute the query.

For more information and examples of using an `ObjectLevelReadQuery` with an `AsOfClause`, see "Using Historical Queries".