[jboss-user] [EJB 3.0] - Re: Cannot join @OneToOne on non-PK fields?

2006-11-13 Thread sisepago
use the referencedColumnName( ) attribute of @JoinColumn if you want to map a field other than a primary-key column, but this field must be unique View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3985455#3985455 Reply to the post :

[jboss-user] [EJB 3.0] - Re: Cannot join @OneToOne on non-PK fields?

2006-11-13 Thread tsar_bomba
sisepago wrote : use the referencedColumnName( ) attribute of @JoinColumn if you want to map a field other than a primary-key column, but this field must be unique I'm guessing you didn't actually read my post. I *am* doing that and it doesn't work correctly. Have a look at the entities I

[jboss-user] [EJB 3.0] - Re: Cannot join @OneToOne on non-PK fields?

2006-11-13 Thread sisepago
# @JoinColumn(name=status, referencedColumnName=code) - please read the jpa spec to understand how to use @JoinColumn: you can only use one of this attributes not both, because if you use both, name=status is used as referenced key # Lazy fetching has no problem, because I also use it:

[jboss-user] [EJB 3.0] - Re: Cannot join @OneToOne on non-PK fields?

2006-11-10 Thread tsar_bomba
boop! Sorry to bump but it's been a few days...any ideas? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3985066#3985066 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3985066 ___