// in a recursive call
PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH1_INIT_STRATEGY),PolytomousKey.class);
-
// checking to make sure the root object is in the session cache
- Assert.assertSame(pkey1.getRoot(), cacher.getFromCache(pkey1.getRoot()));
+ Assert.assertSame(CdmBase.deproxy(pkey1.getRoot(),PolytomousKeyNode.class), cacher.getFromCache(pkey1.getRoot()));
}
PolytomousKey pkey = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
CdmTransientEntityCacher cacher = getCacher(sessionOwner);
// checking to make sure the root object is in the session cache
- Assert.assertSame(pkey.getRoot(), cacher.getFromCache(pkey.getRoot()));
- Assert.assertSame(pkey.getRoot().getStatement(), cacher.getFromCache(pkey.getRoot().getStatement()));
- Assert.assertSame(pkey.getRoot().getQuestion(), cacher.getFromCache(pkey.getRoot().getQuestion()));
+ Assert.assertSame(CdmBase.deproxy(pkey.getRoot(),PolytomousKeyNode.class), cacher.getFromCache(pkey.getRoot()));
+ Assert.assertSame(CdmBase.deproxy(pkey.getRoot().getStatement(),KeyStatement.class), cacher.getFromCache(pkey.getRoot().getStatement()));
+ Assert.assertSame(CdmBase.deproxy(pkey.getRoot().getQuestion(),KeyStatement.class), cacher.getFromCache(pkey.getRoot().getQuestion()));
}
// |- statement : KeyStatement
PolytomousKey pkey1 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
KeyStatement ks1 = pkey1.getRoot().getStatement();
- Assert.assertSame(cacher.getFromCache(pkey1.getRoot().getStatement()), pkey1.getRoot().getStatement());
+ Assert.assertSame(ks1, pkey1.getRoot().getStatement());
CdmTransientEntityCacher cacher = getCacher(sessionOwner);
// this call will load into the session cache the graph and update the objects in the sub-graph for a
// that it exists in the cache and
// that both the original object and the
// cached object are the same
- Assert.assertNotNull(pkey1.getRoot().getStatement());
+ Assert.assertNotNull(CdmBase.deproxy(pkey1.getRoot().getStatement(), KeyStatement.class));
Assert.assertNotNull(cacher.getFromCache(pkey1.getRoot().getStatement()));
// this call will load into the session cache the graph and update the objects in the sub-graph for a
PolytomousKey pkey2 = CdmBase.deproxy(polytomousKeyService.load(polytomousKeyUuid, PKEY_DEPTH2_INIT_STRATEGY),PolytomousKey.class);
- Assert.assertSame(pkey2.getRoot().getStatement(), cacher.getFromCache(pkey2.getRoot().getStatement(), KeyStatement.class));
- Assert.assertSame(st, pkey2.getRoot().getStatement());
+ Assert.assertSame(CdmBase.deproxy(pkey2.getRoot().getStatement(), KeyStatement.class), cacher.getFromCache(pkey2.getRoot().getStatement(), KeyStatement.class));
+ Assert.assertSame(st, CdmBase.deproxy(pkey2.getRoot().getStatement(), KeyStatement.class));
Assert.assertSame(cacher.getFromCache(st), cacher.getFromCache(pkey2.getRoot().getStatement(), KeyStatement.class));
}