You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@causeway.apache.org by "Andi Huber (Jira)" <ji...@apache.org> on 2025/11/13 19:10:00 UTC
[jira] [Updated] (CAUSEWAY-3944) [JPA] Collection Mementos may taint Owner Entity State
[ https://issues.apache.org/jira/browse/CAUSEWAY-3944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andi Huber updated CAUSEWAY-3944:
---------------------------------
Labels: end-user-visible (was: )
> [JPA] Collection Mementos may taint Owner Entity State
> ------------------------------------------------------
>
> Key: CAUSEWAY-3944
> URL: https://issues.apache.org/jira/browse/CAUSEWAY-3944
> Project: Causeway
> Issue Type: Bug
> Components: Persistence JPA
> Reporter: Andi Huber
> Assignee: Andi Huber
> Priority: Major
> Labels: end-user-visible
> Fix For: 4.0.0
>
>
> Given entity A having one-to-many relation with B declared by a collection field C.
> C might be used to provide a multi-valued input for one of A's actions, D say. For this to work we create a table memento of C's content. However, action D may itself modify e.g. delete the content of C., which leads to the following issue:
> The table memento of C and the actual persisted state do no longer agree. Unfortunately in this case, the memento state overrules the DB state. Consequently the end-users gets presented a state of C that is not accurate.
> I don't know how to best fix this yet, but one hot-fix that seems to work is that on internal action invocation, once we are inside a transaction, do a refresh of entity A, before it gets handed down to actions.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)