Commit 4c48be97 authored by Milan Mozolák's avatar Milan Mozolák
Browse files

Added propper adding and removing of missions in country

parent 7b129ee2
Pipeline #122941 waiting for manual action with stage
import com.sun.istack.NotNull;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import javax.persistence.*;
import java.util.List;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
* @author Milan Mozolak
......@@ -54,8 +56,19 @@ public class Country {
@Column(nullable = false)
private String military;
@OneToMany(mappedBy = "country")
private List<Mission> missions;
private Set<Mission> missions = new HashSet<>();
public void addMission(Mission mission) {
public void removeMission(Mission mission) {
public boolean equals(Object o) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment