You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/01/28 15:02:29 UTC
[isis] branch master updated: ISIS-2158:
RepositoryServiceDefault.persist: don't fail on attached
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new d583686 ISIS-2158: RepositoryServiceDefault.persist: don't fail on attached
d583686 is described below
commit d5836860314984945907ab339e54e1de458ea436
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Jan 28 16:02:19 2020 +0100
ISIS-2158: RepositoryServiceDefault.persist: don't fail on attached
---
.../isis/core/runtimeservices/repository/RepositoryServiceDefault.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/repository/RepositoryServiceDefault.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/repository/RepositoryServiceDefault.java
index d6951c4..1828282 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/repository/RepositoryServiceDefault.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/repository/RepositoryServiceDefault.java
@@ -89,7 +89,7 @@ public class RepositoryServiceDefault implements RepositoryService {
throw new PersistFailedException("Object not known to framework (unable to create/obtain an adapter)");
}
val entityState = ManagedObject._entityState(adapter);
- val skip = !entityState.isPersistable() || entityState.isDestroyed();
+ val skip = !entityState.isDetached(); // only persist detached entities, otherwise skip
if(skip) {
return domainObject;
}