}
field.setAccessible(true);
Object o = field.get(cdmEntity);
+ // resetting the value in cdm entity to the deproxied object
o = ProxyUtils.deproxy(o);
field.set(cdmEntity, o);
CdmBase cdmEntityInSubGraph = null;
- if(update) {
- // if we are in update mode we have to make the field of the cached entity
- // up-to-date by setting it to the value of the cdm entity being loaded
- // NOTE : two exceptions to this are found below
- field.set(cachedCdmEntity, o);
- }
if(o != null && !ProxyUtils.isProxy(o)) {
if(CdmBase.class.isAssignableFrom(o.getClass())) {
logger.info("found initialised cdm entity '" + fieldName + "' in object of type " + clazz.getName() + " with id " + cdmEntity.getId());
+ if(update) {
+ // if we are in update mode we have to make the field of the cached entity
+ // up-to-date by setting it to the value of the cdm entity being loaded
+ // NOTE : two exceptions to this are found below
+ field.set(cachedCdmEntity, o);
+
+ }
cdmEntityInSubGraph = (CdmBase)o;
CdmBase cachedCdmEntityInSubGraph = cdmCacher.getFromCache(cdmEntityInSubGraph);