#16 -- Fix npe
This commit is contained in:
parent
a867c12b33
commit
50bc8aee9e
@ -9,6 +9,7 @@ import javax.persistence.FetchType;
|
|||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@ -21,7 +22,7 @@ public class Branch extends BaseEntity {
|
|||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "branch_id", unique = true)
|
@JoinColumn(name = "branch_id", unique = true)
|
||||||
@Fetch(FetchMode.SUBSELECT)
|
@Fetch(FetchMode.SUBSELECT)
|
||||||
private List<Commit> commits;
|
private List<Commit> commits = new ArrayList<>();
|
||||||
|
|
||||||
public Branch() {
|
public Branch() {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user