LazyInitializationException错误

时间:2016-11-28 10:36:54

标签: java hibernate entity

我上课let array = ["You", "Shall", "Not", "PASS!"] // if I convert this into string // it would roughly be equal to the variable 'stringArray' if String(array) == stringArray { print("true") } else { print("false") } // output would be true

TestPrint

@Entity public class TestPrint implements Serializable{ @OneToMany(mappedBy = "testPrint", fetch = FetchType.LAZY, cascade = CascadeType.ALL) private List<Commants> testPrintCommants = new ArrayList<>(); }

Commants

我想在@Entity public class Commants implements Serializable{ @ManyToOne @JoinColumn(name = "testPrint_id", nullable = false) private TestPrint testPrint; } 页面中显示列表testPrintCommants

0 个答案:

没有答案