while migrating from 4.0.4.CR2 to 4.0.4.GA I got: 2006-05-24 13:43:01,565 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed persistence.units:ear=migpt.ear,unitName=migpt | org.hibernate.AnnotationException: Unknown mappedBy in: ps.eb.EbMaster.myPkDetail, referenced property unknown: ps.eb.EbPKJoinDetail.myMaster | at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:127) | at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1049) | at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:302) | at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034) | at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1015) | at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154) | at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:751) | at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:350)
The relation is via primaryKey | public class EbMaster { | | private int id; | @Id | @Column(name="id", nullable=false) | public int getId() | { | return id; | } | private EbPKJoinDetail myPkDetail; | @OneToOne(optional=true,mappedBy="myMaster",fetch=FetchType.LAZY) | public EbPKJoinDetail getMyPkDetail() | { | return myPkDetail; | } | } // class EbMaster | public class EbPKJoinDetail { | | private int id; | @Id | @Column(name="id", nullable=false) | public int getId() | { | return id; | } | private EbMaster myMaster; | @OneToOne(optional=false,fetch=FetchType.LAZY) | @JoinColumn(name="id",referencedColumnName="id",insertable=false,updatable=false) | public EbMaster getMyMaster() | { | return myMaster; | } | } // class EbPKJoinDetail this worked with 4.0.4.RC1 and CR2 and I have a lot of such relations within my legacy database. Can anyone help me, thanks in advance Karsten View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946088#3946088 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3946088 ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user