Skip Headers

# Using an ObjectLevelReadQuery in a Historical Session

Previous

Next

Given a session that maintains historical versions of objects (based on an appropriate `OraclePlatform` or TopLink `HistoryPolicy`), you can use `Session` method `acquireHistoricalSession` passing in an `AsOfClause` that specifies a point in time that applies to all queries and expressions.

This method returns a lightweight, read-only snapshot of object versions as of the specified time. The cache used in this type of session is isolated from the global shared cache. You do not need to set `ObjectLevelReadQuery` method `maintainCache` to `false` in this case.

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