Found a workaround, or the required solution:
use the @PrimaryKeyJoinColumn annotation
on both sides of the relation.

  | public class EbMaster {
  | ...
  |     private EbPKJoinDetail myPkDetail;
  | @OneToOne(optional=true,fetch=FetchType.LAZY)
  | @PrimaryKeyJoinColumn(name="id",referencedColumnName="id")
  |     public EbPKJoinDetail getMyPkDetail()
  |     {
  |             return myPkDetail;
  |     }
  | }
  | public class EbPKJoinDetail {
  | ...
  |     private EbMaster myMaster;
  | @OneToOne(optional=false,fetch=FetchType.LAZY)
  | @PrimaryKeyJoinColumn(name="id",referencedColumnName="id")
  |     public EbMaster getMyMaster()
  |     {
  |             return myMaster;
  |     }
  | }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949779#3949779

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949779


_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to