REFRESH Hint On Object That Contains @JoinFetch Does Not Refresh Cache

(Doc ID 1595690.1)

Last updated on JANUARY 26, 2015

Applies to:

Oracle TopLink - Version 12.1.1.0 to 12.1.1.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

When REFRESH hint is set to true on a query for an object that contains @JoinFetch relationship, the related objects are not updated with changes from the database. For example:

Plan -- ManyToOne --> Service

The ManyToOne is also annotated with @JoinFetch. Query the Plan object and after that re-querying the Plan object with the REFRESH hint set to true you will not see any changes in the database from out of bounds update to the Service object (e.g. out of bounds update could be from another appserver or application).

Example Environment:

Toplink 12.1.1.0
java version "1.6.0_43"
Oracle 11g 11.2.0.3 with Oracle Thin JDBC 11.2.0.3 Driver

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms