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 {
private List<Table> tables;
@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;
@ToString.Exclude
......
......@@ -24,6 +24,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
import java.util.List;
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.Mockito.doNothing;
import static org.mockito.Mockito.when;
......@@ -91,6 +92,9 @@ public class ViewServicePersistenceTest extends AbstractUnitTest {
/* test */
viewService.delete(VIEW_1);
assertThrows(ViewNotFoundException.class, () -> {
viewService.findById(DATABASE_1, VIEW_1_ID);
});
}
}
......@@ -1292,7 +1292,7 @@
{
"matcher": {
"id": "byName",
"options": "auth-service:8080"
"options": "auth-service:9000"
},
"properties": [
{
......@@ -1442,10 +1442,6 @@
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
......@@ -1455,7 +1451,7 @@
{
"matcher": {
"id": "byName",
"options": "auth-service:8080"
"options": "auth-service:9000"
},
"properties": [
{
......@@ -1803,7 +1799,7 @@
"type": "timeseries"
}
],
"refresh": "5s",
"refresh": "1m",
"schemaVersion": 39,
"tags": [
"provisioned",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment