You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrey Razumovsky (JIRA)" <ji...@apache.org> on 2009/02/03 07:54:45 UTC
[jira] Closed: (CAY-742) Client CayenneContext doesn't evict
objects after delete
[ https://issues.apache.org/cayenne/browse/CAY-742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Razumovsky closed CAY-742.
---------------------------------
Resolution: Duplicate
This is same as CAY-1129
> Client CayenneContext doesn't evict objects after delete
> --------------------------------------------------------
>
> Key: CAY-742
> URL: https://issues.apache.org/cayenne/browse/CAY-742
> Project: Cayenne
> Issue Type: Bug
> Components: Cayenne Core Library
> Affects Versions: 3.0
> Reporter: Andrus Adamchik
> Assignee: Andrus Adamchik
> Fix For: Short term future
>
>
> Per http://objectstyle.org/cayenne/lists/cayenne-user/2007/01/0078.html client cayenne context doesn't properly reset the state of deleted objects (context is not null). When I tried to test it using the trunk version of 3.0, I stumbled upon a slightly different problem - a deleted object is not evicted from the context GraphManager (it sits there in transient state). Need to investigate that more.
> CayenneContextWithDataContextTest.java:
> public void testDelete() throws Exception {
> deleteTestData();
> UnitLocalConnection connection = new UnitLocalConnection(new ClientServerChannel(
> getDomain()), LocalConnection.HESSIAN_SERIALIZATION);
> ClientChannel channel = new ClientChannel(connection);
> CayenneContext context = new CayenneContext(channel);
>
> ClientMtTable1 o = (ClientMtTable1) context.newObject(ClientMtTable1.class);
> o.setServerAttribute1("S1");
> context.commitChanges();
> context.deleteObject(o);
> assertSame(context, o.getObjectContext());
> context.commitChanges();
>
> assertNull(o.getObjectContext());
> // **** THIS FAILS ****
> assertNull(context.getGraphManager().getNode(o.getObjectId()));
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.