-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Bi-direction OneToOne: Broken column mapping for ... Why
PostPosted: Tue Aug 09, 2005 4:31 am 
Newbie

Joined: Mon Apr 18, 2005 2:45 am
Posts: 3
The source:

Code:
@Entity(access=AccessType.FIELD)
public class Party {
   @Id
   String partyId;
   
   @OneToOne(mappedBy="party")
   PartyAffiliate partyAffiliate;
}


Code:
@Entity(access = AccessType.FIELD)
public class PartyAffiliate {
   @Id
   String partyId;
   
   @OneToOne
   @JoinColumn(name="partyId", referencedColumnName="partyId", insertable=false, updatable= false)
   Party party;
   
   String affiliateName;
}


Error:
Code:
16:23:16,195  INFO SessionFactoryImpl: building session factory
org.hibernate.MappingException: broken column mapping for: partyAffiliate.party of: org.ofbiz.oam.brokencolumn.Party
   at org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:122)
   at org.hibernate.persister.entity.AbstractPropertyMapping.initIdentifierPropertyPaths(AbstractPropertyMapping.java:183)
   at org.hibernate.persister.entity.AbstractPropertyMapping.initPropertyPaths(AbstractPropertyMapping.java:160)
   at org.hibernate.persister.entity.AbstractEntityPersister.initOrdinaryPropertyPaths(AbstractEntityPersister.java:1458)
   at org.hibernate.persister.entity.AbstractEntityPersister.initPropertyPaths(AbstractEntityPersister.java:1486)
   at org.hibernate.persister.entity.AbstractEntityPersister.postConstruct(AbstractEntityPersister.java:2464)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:386)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:216)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1033)


If I removed the @JoinColumn annotation in PartyAffiliate class, the error goes away. I'm using 3.1Beta4.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 5:18 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
open a JIRA issue.
A minimal runnable test case would be great :-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Issue posted and attached testcase
PostPosted: Thu Aug 11, 2005 1:43 pm 
Newbie

Joined: Mon Apr 18, 2005 2:45 am
Posts: 3
http://opensource.atlassian.com/projects/hibernate/browse/ANN-67


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.