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/23 09:49:14 UTC

[isis] branch master updated: ISIS-2158: fix smoketest: don't return detached entity in action

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 0ef79d2  ISIS-2158: fix smoketest: don't return detached entity in action
0ef79d2 is described below

commit 0ef79d271eeae242ab8800be7b9659677357b95b
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Jan 23 10:49:05 2020 +0100

    ISIS-2158: fix smoketest: don't return detached entity in action
---
 .../main/java/org/apache/isis/testdomain/jdo/InventoryResource.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/InventoryResource.java b/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/InventoryResource.java
index aa1c0a5..f9fb309 100644
--- a/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/InventoryResource.java
+++ b/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/InventoryResource.java
@@ -54,7 +54,9 @@ public class InventoryResource {
 
     @Action
     public Book recommendedBookOfTheWeek() {
-        return Book.of("Book of the week", "An awesome Book", 12, "Author", "ISBN", "Publisher");
+        // for this test we do not care if we generate duplicates
+        val book = Book.of("Book of the week", "An awesome Book", 12, "Author", "ISBN", "Publisher");
+        return repository.persist(book);
     }
 
     @Action //TODO improve the REST client such that the param can be of type Book