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.  [ 2 posts ] 
Author Message
 Post subject: joined-subclass and one-to-one association
PostPosted: Mon Feb 11, 2008 4:39 pm 
Newbie

Joined: Wed Nov 07, 2007 2:33 pm
Posts: 2
Hi

I have a class A with a joined-subclass B in my mapping files, and a class C with a one-to-one association with subclass B.

When i try to run my app i get the following error:
"property-ref [D] not found on entity [B]" and is right because entitiy B not contains the primary key of C, in my relational model table A have a foreign key to table C, and table B have a foreign key to table A, but table B not contains the primary key (the field) of table C.

My question is: how is possible to do this ?



Kind regards

Desbaratizador


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 11, 2008 7:44 pm 
Beginner
Beginner

Joined: Tue Mar 27, 2007 4:54 am
Posts: 47
Maybe you cannot change your db scheme but...

If possible, try to use table-per-concrete class strategy instead. That's how I did it anyhow when I had similar issues.

Depending on which way the reference goes, a component mapping may also work (but I think you want the ref the other way around?).


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.