[
https://issues.apache.org/jira/browse/ISIS-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14165068#comment-14165068
]
ASF subversion and git services commented on ISIS-404:
------------------------------------------------------
Commit 08d2a053c167102b82a3c15ee7b8e047d52fc292 in isis's branch
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=08d2a05 ]
ISIS-404: unwrap domain object in DomainObjectContainerDefault before calling
down into framework to determine persistence state of the wrapping adapter.
Have chosen to implement here in the service (at the outer most layer) to
minimize any risk of unforeseen consequences if did the wrapper deeper in the
guts of the framework, in particular the adapter manager identity hash maps.
> Testing if a "wrapped" Domain Object has been persisted fails
> -------------------------------------------------------------
>
> Key: ISIS-404
> URL: https://issues.apache.org/jira/browse/ISIS-404
> Project: Isis
> Issue Type: Bug
> Components: Core
> Affects Versions: core-1.1.0
> Environment: Testing against current JUnit viewer snapshot over the
> 1.0.2 quickstart prototype.
> Reporter: Oscar Bou
> Assignee: Dan Haywood
> Labels: test
> Fix For: core-1.7.0
>
>
> While doing tests over factory actions, one assert would be to verify the
> object has been persisted through the
> DomainObjectContainer.isPersistent(domainObject) method.
> If the evaluation is done over a wrapped object, it returns false.
> If it's done over the original object, it returns true.
> As an example:
> // Test if the Domain Object has been persisted.
> assertTrue(domainObjectContainer
>
> .isPersistent(communicationPathAssociatedWithNode));
> // Node must be wrapped for the Apache Isis validators to be
> executed.
> communicationPathAssociatedWithNode =
> wrapped(communicationPathAssociatedWithNode);
> assertTrue(domainObjectContainer
>
> .isPersistent(communicationPathAssociatedWithNode));
> The last assertion fails. The only difference I expected was the validation
> of the programming model.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)