This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

does Hibernate support one-to-one bidirectional in subclass?

fu bace
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have two mapping file

if i wrote

Customer customer = (Customer)userDao.getUserById(1);

it gives an error

00:02:36,274 ERROR JDBCExceptionReporter:101 - Unknown column 'customer1_.basket_id' in 'on clause'

if i delete the line
<one-to-one name="customer" class="com.ebazaar.customer.model.Customer" property-ref="basket" lazy="false"/>
in Basket.hbm.xml

it doesnt give any error but i cant reach from customer from basket like this.
basket = basketDao.getBasketById(1);
basket.getCustomer(); //null

Do you have any idea???

What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!