• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Complicated mapping problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a complicated mapping problem:
Consider the following db schema:

I need to map this to the following beans, and unfortunately I can't change nor the bean structure neither the db schema.



So far I have tried the following mappings:



This doesn't work: "collection foreign key mapping has wrong number of columns", due to the non-declaration of the composite primary key in EOUser (which I can't declare there, because I can only have 'eoUserId' in the EOUser bean). I know the db schema is sh*t (no direct PK's, only foreign keys which form a PK), but I'd like to know if it is possible to map this with Hibernate.
Thanks in advance.

Joris
 
Get me the mayor's office! I need to tell her about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic