Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dealing with legacy databases..

 
Brick Riccardi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic