This is what i did
@Embeddable
public class Address implements Serializable{
private static final long serialVersionUID = 1L;
private String addr1;
private String addr2;
private String addr3;
@Column(name="ADDR1", length=30)
public String getAddr1() {
return addr1;
}
public void setAddr1(String addr1) {
this.addr1 = addr1;
}
@Column(name="ADDR2", length=30)
public String getAddr2() {
return addr2;
}
public void setAddr2(String addr2) {
this.addr2 = addr2;
}
@Column(name="ADDR3", length=30)
public String getAddr3() {
return addr3;
}
public void setAddr3(String addr3) {
this.addr3 = addr3;
}
}
@Entity
public class Customer implements java.io.Serializable {
private static final long serialVersionUID = 1L;
private String Id;
private String custName;
@Id
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCustName() {
return custName;
}
public void setCustName(String custName) {
this.custName = custName;
}
}
I dont know how to embed the address into customer.class. Can you please give some help.
Thanks
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216469#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...