You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/07/24 07:43:49 UTC

[jira] [Commented] (ISIS-476) Update JDO/DN to allow for fact that invoking the Persisting callback may have resulted in the target object having already been updated.

    [ https://issues.apache.org/jira/browse/ISIS-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13718012#comment-13718012 ] 

ASF subversion and git services commented on ISIS-476:
------------------------------------------------------

Commit 51690aab0b67c216c5aa59fde74a579e6a2fb782 in branch refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=51690aa ]

ISIS-476: added guard to DataNucleusSimplePersistAlgorithm

                
> Update JDO/DN to allow for fact that invoking the Persisting callback may have resulted in the target object having already been updated.
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-476
>                 URL: https://issues.apache.org/jira/browse/ISIS-476
>             Project: Isis
>          Issue Type: Bug
>          Components: Objectstore: JDO
>    Affects Versions: objectstore-jdo-1.1.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: objectstore-jdo-1.2.0
>
>
> This issue was found while working on Estatio app:
> public class CommunicationChannel {
>     ....
>     /**
>      * Isis callback
>      */
>     public void persisting() {
>         owner.addToCommunicationChannels(this);
>     }
> }
> correctly generates the INSERT of the owner/CC tuple (eg into PARTY_COMMUNICATIONCHANNELS), but then Isis throws an exception.
> The fix is to add a guard in DataNucleusSimplePersistAlgorithm:
>     public void makePersistent(final ObjectAdapter adapter,
>             final ToPersistObjectSet toPersistObjectSet) {
>         ...
>         CallbackUtils.callCallback(adapter, PersistingCallbackFacet.class);
>         // the callback might have caused the adapter to become persistent.
>         if (alreadyPersistedOrNotPersistable(adapter)) {
>             return;
>         }
>         ...
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira