• 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

Dealing with legacy databases..

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One thing I'm finding quite frustrating with Hibernate is having to create objects to represent my composite primary keys. Am I missing something or is this what typically 'has' to be done? Hibernate seems nice when your domain model is created first and your db model can follow suit, but many of us are stuck with having to work with legacy systems. I'm not trying to dis Hibernate, but it seems like with legacy dbs iBATIS is ofen a better fit. Many company databases don't really seem to match up nicely with an object model and the objects you create to 'force' this match seem so out of place.

Are there some tips you guys can give me in regard to dealing with legacy dbs and using Hibernate?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actaully this is a great example of why Hibernate is so powerful and needed. Is because most legacy databases are more of a mismatch to Object models than newer models.

So the big thing is that Hibernate will have a big learning curve for you because you have to know more mappings than most.

I thought you could just map the composite columns and not have to have a CompositeKey object hold them. But I kind of like that object model anyway.

Mark
 
Die Fledermaus does not fear such a 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