Skip to content
Snippets Groups Projects
Verified Commit 30cdedfd authored by Martin Weise's avatar Martin Weise
Browse files

WIP

parent 749de1a5
Branches
No related tags found
1 merge request!331Hotfix deletion of views
...@@ -122,7 +122,8 @@ public class Database implements Serializable { ...@@ -122,7 +122,8 @@ public class Database implements Serializable {
private List<Table> tables; private List<Table> tables;
@ToString.Exclude @ToString.Exclude
@OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST}, mappedBy = "database", orphanRemoval = true) @OrderBy("id DESC")
@OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.ALL, CascadeType.PERSIST}, mappedBy = "database", orphanRemoval = true)
private List<View> views; private List<View> views;
@ToString.Exclude @ToString.Exclude
......
...@@ -24,6 +24,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; ...@@ -24,6 +24,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
import java.util.List; import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
...@@ -91,6 +92,9 @@ public class ViewServicePersistenceTest extends AbstractUnitTest { ...@@ -91,6 +92,9 @@ public class ViewServicePersistenceTest extends AbstractUnitTest {
/* test */ /* test */
viewService.delete(VIEW_1); viewService.delete(VIEW_1);
assertThrows(ViewNotFoundException.class, () -> {
viewService.findById(DATABASE_1, VIEW_1_ID);
});
} }
} }
...@@ -1292,7 +1292,7 @@ ...@@ -1292,7 +1292,7 @@
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "auth-service:8080" "options": "auth-service:9000"
}, },
"properties": [ "properties": [
{ {
...@@ -1442,10 +1442,6 @@ ...@@ -1442,10 +1442,6 @@
{ {
"color": "green", "color": "green",
"value": null "value": null
},
{
"color": "red",
"value": 80
} }
] ]
}, },
...@@ -1455,7 +1451,7 @@ ...@@ -1455,7 +1451,7 @@
{ {
"matcher": { "matcher": {
"id": "byName", "id": "byName",
"options": "auth-service:8080" "options": "auth-service:9000"
}, },
"properties": [ "properties": [
{ {
...@@ -1803,7 +1799,7 @@ ...@@ -1803,7 +1799,7 @@
"type": "timeseries" "type": "timeseries"
} }
], ],
"refresh": "5s", "refresh": "1m",
"schemaVersion": 39, "schemaVersion": 39,
"tags": [ "tags": [
"provisioned", "provisioned",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment