1 22 package org.jboss.ejb3.test.regression.salesforce7123; 23 24 import java.io.Serializable ; 25 import javax.persistence.Entity; 26 import javax.persistence.Id; 27 import javax.persistence.GeneratedValue; 28 import javax.persistence.ManyToOne; 29 import javax.persistence.FetchType; 30 31 37 @Entity 38 public class Child implements Serializable 39 { 40 private int id; 41 private String data; 42 private BaseData parent; 43 44 @Id @GeneratedValue 45 public int getId() 46 { 47 return id; 48 } 49 50 public void setId(int id) 51 { 52 this.id = id; 53 } 54 55 public String getData() 56 { 57 return data; 58 } 59 60 public void setData(String data) 61 { 62 this.data = data; 63 } 64 65 @ManyToOne(fetch= FetchType.EAGER) 66 public BaseData getParent() 67 { 68 return parent; 69 } 70 71 public void setParent(BaseData parent) 72 { 73 this.parent = parent; 74 } 75 } 76 | Popular Tags |