[jboss-user] [EJB 3.0] - Re: Advanced problems with Jboss and Hibernate !
DivxYoda
do-not-reply at jboss.com
Fri Nov 10 11:43:41 EST 2006
Hi konstantin thanks alot for your reply, do you mean that i shoul have :
@Entity
@Table(name = "Daughter")
@IdClass(DaughterKey.class)
@PrimaryKeyJoinColumn(name = "Mother_id")
public class Daughter extends Mother{
private String daughter_id;
@Id
private DaughterKey myKey=new DaughterKey();
public Daughter(){
super();
myKey.setMotherId(super.getId());
myKey.setDaughterId(getDaugherId())),
}
//.. getter/setter for all fields
}
instead of :
@Entity
@Table(name = "Daughter")
@IdClass(DaughterKey.class)
@PrimaryKeyJoinColumn(name = "Mother_id")
public class Daughter extends Mother{
@Id
private String daughter_id;
public Daughter(){ super();}
//.. getter/setter for all fields
}
Is it your idea ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984978#3984978
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984978
More information about the jboss-user
mailing list