[jboss-user] [EJB 3.0] - Re: How to save entities with PrimaryKeyJoinColumn?
drathnow
do-not-reply at jboss.com
Thu Jan 17 09:37:19 EST 2008
But the referencing key is the primary key of the entity. Isn't that what @PrimaryKeyJoinColumn is suppose to imply? I would've assumed there would be some way for the implementation to realize this and setup the keys appropriately.
I've tried a couple of different strategies all with the same results. But here is what I've got now:
public class Field {
@Id
@SequenceGenerator(name = "fieldname_seq", sequenceName = "fieldname_seq")
@GeneratedValue(strategy = SEQUENCE, generator = "fieldname_seq")
private long fieldId;
}
public class FieldAccess {
@Id
private long fieldId;
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120907#4120907
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120907
More information about the jboss-user
mailing list