I have found an issue that I think is a bug, but I want to make sure that is
the case.

Given the following scenario:

Object A has 'refresh=true' on it's descriptor, and has a reference to
Object B, and in the reference descriptor for Object B, 'refresh=true' is
set as well.

However, Object B's class descriptor does not have the 'refresh=true' set.

In my scenario, when Object A is retrieved, I want to always refresh, and to
refresh Object B...but I don't want Object B to be refreshed in every
situation, only when Object A is getting refreshed.

Based upon having refresh attributes available on both the references and
class descriptors, I would assume this would work.

However, looking through the code, when refreshing Object A, it will look
and correctly realize that it needs to refresh Object B, but when Object B
is then attempting to be refreshed, it looks at it's class descriptor and
sees that it does not need to refreshed, and returns the cached object. 

So, even though the reference descriptor says to refresh, the object ignores
it and doesn't because it the class descriptor for that class says it does
not need to be refreshed.

Is this expected behavior?

For those who want to look at the code..

In the method PersistenceBrokerImpl.getReferencedObject() -- if the object
is already in the cache, it will blindly call
PersistenceBrokerImpl.getObjectByIdentity(), which will only look at the
ClassDescriptor to determine whether or not to cache it, and not the
ReferenceDescriptor that was determining that it need to be refreshed.

-Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to