diff --git a/src/main/java/ru/ulstu/extractor/model/Branch.java b/src/main/java/ru/ulstu/extractor/model/Branch.java index 02a6349..5c39ce9 100644 --- a/src/main/java/ru/ulstu/extractor/model/Branch.java +++ b/src/main/java/ru/ulstu/extractor/model/Branch.java @@ -9,6 +9,7 @@ import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; +import java.util.ArrayList; import java.util.List; @Entity @@ -21,7 +22,7 @@ public class Branch extends BaseEntity { @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @JoinColumn(name = "branch_id", unique = true) @Fetch(FetchMode.SUBSELECT) - private List commits; + private List commits = new ArrayList<>(); public Branch() { }