branch.java
来自「hibernate3.2.6源码和jar包」· Java 代码 · 共 41 行
JAVA
41 行
//$Id: $package org.hibernate.test.annotations.fetch;import java.util.Set;import java.util.HashSet;import javax.persistence.Id;import javax.persistence.GeneratedValue;import javax.persistence.OneToMany;import javax.persistence.Entity;import javax.persistence.FetchType;/** * @author Emmanuel Bernard */@Entitypublic class Branch { @Id @GeneratedValue private Integer id; @OneToMany(mappedBy = "branch", fetch = FetchType.EAGER ) private Set<Leaf> leaves = new HashSet<Leaf>(); public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Set<Leaf> getLeaves() { return leaves; } public void setLeaves(Set<Leaf> leaves) { this.leaves = leaves; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?