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.
|