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

Andi Huber closed ISIS-2979.
----------------------------
    Resolution: Duplicate

> [Duplicate] Removing any JPA entity in an action, which is in a parameter 
> value, causes ObjectNotFoundException
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-2979
>                 URL: https://issues.apache.org/jira/browse/ISIS-2979
>             Project: Isis
>          Issue Type: Bug
>          Components: Isis Core
>    Affects Versions: 2.0.0-M7
>            Reporter: Miklós Győrfi
>            Assignee: Andi Huber
>            Priority: Major
>             Fix For: 2.0.0-RC1
>
>
> Good example to create an action, with List<Entity> parameter, and remove 
> these entities from the database in the action body. After the execution, 
> this causes ObjectNotFoundException, because FormExecutorDefault calculates 
> resultResponse with using snapshotArgs of ActionModel, which tries to refresh 
> parameter, but it is deleted. JPA does not distinct detached and removed 
> entity - stated in JpaEntityFacet - and the context treats it as detached (I 
> think it is a good solution in JDO, entities with deleted state are ignored, 
> but JPA sends back a detached state, even if it is deleted). A comment
> "//XXX whether DETACHED or REMOVED is currently undecidable (JPA)"
>  warns it well, but a better solution is necessary. An acceptable solution is 
> to catch the exception in parameter value refresh operation in 
> EntityUtil.refetch.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to