Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Sep 9, 2024
1 parent 103a456 commit 4ed11a4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public class Process extends BaseTemplateBean {
@JoinColumn(name = "property_id", foreignKey = @ForeignKey(name = "FK_workpiece_x_property_property_id")) })
private List<Property> workpieces;

@LazyCollection(LazyCollectionOption.FALSE)
@ManyToMany(mappedBy = "processes")
@IndexedEmbedded(includePaths = {"title", "id"})
private List<Batch> batches = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public class Project extends BaseBean implements Comparable<Project> {
@GenericField
private Boolean active = true;

@LazyCollection(LazyCollectionOption.FALSE)
@ManyToMany(mappedBy = "projects", cascade = CascadeType.PERSIST)
@IndexedEmbedded(includePaths = {"surname", "name", "id", "login"})
private List<User> users;
Expand All @@ -143,6 +144,7 @@ public class Project extends BaseBean implements Comparable<Project> {
foreignKey = @ForeignKey(name = "FK_project_default_child_process_importconfiguration_id"))
private ImportConfiguration defaultChildProcessImportConfiguration;

@LazyCollection(LazyCollectionOption.FALSE)
@OneToMany(mappedBy = "project", cascade = CascadeType.ALL, orphanRemoval = true)
@IndexedEmbedded(includePaths = {"path", "urlStructure", "fileGroup", "mimeType"})
private List<Folder> folders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@

import java.util.Locale;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.kitodo.MockDatabase;
import org.kitodo.data.database.beans.Process;
import org.kitodo.data.database.beans.Ruleset;
import org.kitodo.production.helper.TempProcess;
Expand All @@ -25,6 +28,17 @@

public class ProcessDataTabTest {

@BeforeClass
public static void setUp() throws Exception {
MockDatabase.startNode();
}

@AfterClass
public static void tearDown() throws Exception {
MockDatabase.stopNode();
MockDatabase.cleanDatabase();
}

/**
* Test the generation of atstsl fields.
*
Expand Down

0 comments on commit 4ed11a4

Please sign in to comment.