getPrimaryKey() primary key is handled by client container and not fetching the value from the persistent context. So, the answer is no even for UserTransaction. You need to access some CMP or CMR field to load the data into the cache.
Do you need to access the CMP field as part as a UserTransaction to ensure
caching or is accessing it enough?
Just invoking a get method of a CMP or CMR field would be enough. Assuming standard container with CO A or D.