"A detached entity maintains its persistent identity, but cannot load
additional state from the datastore. Accessing any persistent field or
property that was not loaded at the time of detachment has undefined
results."
Even though this works with toplink, it's apparently not part of the
spec (if the kodo documentation is to be trusted). Hmm...
Before I go to sleep, I found an article that confirms what you thought
about the cache in Toplink (apparently the spec itself is vague).
Toplink does keep a cache for all objects, without considering the
entity manager. The difference between the general cache and the cache
maintained while an entity manager is open is:
- In the case of the latter a cached object will not be evicted from the
cache while the EM is open.