-->
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.  [ 1 post ] 
Author Message
 Post subject: One-to-one join using primary key
PostPosted: Sun Mar 27, 2005 10:59 pm 
Newbie

Joined: Sun Mar 27, 2005 10:50 pm
Posts: 1
I have two tables A and B. The primary key for both tables is USERNAME. Also, the USERNAME column in B, in addition to being a primary key, ia also a foreign key to the USERNAME column in A. When I use MyEclipse to generate a hibernate mapping for A and B, and then write a query like:
sess.createQuery("select b from B b")
I get an error like this:
net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of test.AbstractB.a at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:68) at
...etc.

I am using Oracle 9 as the database. Any insights will be appreciated.


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

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.