• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

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

Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???

When you have exhausted all possibilities, remember this: you haven't - Edison. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic