cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-2243) ObjectContext.getGraphManager().unregisterObject() inconsistencies
Date Fri, 10 Mar 2017 15:32:04 GMT

     [ https://issues.apache.org/jira/browse/CAY-2243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nikita Timofeev updated CAY-2243:
---------------------------------
    Fix Version/s: 4.0.M6

> ObjectContext.getGraphManager().unregisterObject() inconsistencies
> ------------------------------------------------------------------
>
>                 Key: CAY-2243
>                 URL: https://issues.apache.org/jira/browse/CAY-2243
>             Project: Cayenne
>          Issue Type: Bug
>    Affects Versions: 3.1.1, 4.0.M4
>            Reporter: Andrus Adamchik
>            Priority: Minor
>             Fix For: 4.0.M6
>
>
> ObjectContext.getGraphManager().unregisterObject() behaves inconsistently between ROP
and regular Cayenne in regards to the object state after unregistering, and I don't think
either one of the two is fully correct.
> 1. Here is the desired behavior, which seems like the most reasonable outcome - ObjectContext
is set to null, persistent state - to TRANSIENT, ObjectId is preserved. I.e. object is kicked
out of the context, but does not lose its identity:
>         graphManager.unregisterNode(object.getObjectId());
>         verify(object, times(0)).setObjectId(null);
>         verify(object).setObjectContext(null);
>         verify(object).setPersistenceState(PersistenceState.TRANSIENT);
> 2. ROP Behavior:
>        // succeeds
>         verify(object, times(0)).setObjectId(null);
>         // fails
>         verify(object).setObjectContext(null);
>         // fails
>         verify(object).setPersistenceState(PersistenceState.TRANSIENT);
> 3. Server Behavior:
>        // fails
>         verify(object, times(0)).setObjectId(null);
>         // succeeds
>         verify(object).setObjectContext(null);
>         // succeeds
>         verify(object).setPersistenceState(PersistenceState.TRANSIENT);



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message